@auth0/auth0-react 1.4.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -3
- package/dist/auth-state.d.ts +3 -3
- package/dist/auth-state.d.ts.map +1 -1
- package/dist/auth0-context.d.ts +12 -3
- package/dist/auth0-context.d.ts.map +1 -1
- package/dist/auth0-provider.d.ts +8 -2
- package/dist/auth0-provider.d.ts.map +1 -1
- package/dist/auth0-react.cjs.js +74 -25
- package/dist/auth0-react.cjs.js.map +1 -1
- package/dist/auth0-react.esm.js +72 -26
- package/dist/auth0-react.esm.js.map +1 -1
- package/dist/auth0-react.js +74 -25
- package/dist/auth0-react.js.map +1 -1
- package/dist/auth0-react.min.js +13 -13
- package/dist/auth0-react.min.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/reducer.d.ts +4 -3
- package/dist/reducer.d.ts.map +1 -1
- package/dist/use-auth0.d.ts +5 -2
- package/dist/use-auth0.d.ts.map +1 -1
- package/dist/with-authentication-required.d.ts +6 -1
- package/dist/with-authentication-required.d.ts.map +1 -1
- package/package.json +10 -7
- package/src/auth-state.tsx +3 -3
- package/src/auth0-context.tsx +15 -1
- package/src/auth0-provider.tsx +32 -3
- package/src/index.tsx +5 -0
- package/src/reducer.tsx +5 -2
- package/src/use-auth0.tsx +7 -3
- package/src/utils.tsx +2 -2
- package/src/with-authentication-required.tsx +24 -6
- package/CHANGELOG.md +0 -101
package/dist/auth0-react.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e=e||self).reactAuth0={},e.React)}(this,(function(e,t){"use strict";var n="default"in t?t.default:t,r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -12,19 +12,19 @@
|
|
|
12
12
|
|
|
13
13
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
14
14
|
and limitations under the License.
|
|
15
|
-
***************************************************************************** */var
|
|
15
|
+
***************************************************************************** */var o=function(){return(o=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}).apply(this,arguments)};function i(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 c(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 a(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])}}}
|
|
16
16
|
/*! *****************************************************************************
|
|
17
|
-
Copyright (c) Microsoft Corporation.
|
|
18
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
19
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
20
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
Copyright (c) Microsoft Corporation.
|
|
21
18
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
25
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
19
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
20
|
+
purpose with or without fee is hereby granted.
|
|
26
21
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
***************************************************************************** */var l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function u(t,e){function i(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var a=function(){return(a=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var c in e=arguments[i])Object.prototype.hasOwnProperty.call(e,c)&&(t[c]=e[c]);return t}).apply(this,arguments)};function I(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var c=0;for(n=Object.getOwnPropertySymbols(t);c<n.length;c++)e.indexOf(n[c])<0&&Object.prototype.propertyIsEnumerable.call(t,n[c])&&(i[n[c]]=t[n[c]])}return i}function g(t,e,i,n){return new(i||(i=Promise))((function(c,o){function r(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){t.done?c(t.value):new i((function(e){e(t.value)})).then(r,s)}l((n=n.apply(t,e||[])).next())}))}function d(t,e){var i,n,c,o,r={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(c=2&o[0]?n.return:o[0]?n.throw||((c=n.return)&&c.call(n),0):n.next)&&!(c=c.call(n,o[1])).done)return c;switch(n=0,c&&(o=[2&o[0],c.value]),o[0]){case 0:case 1:c=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,n=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!((c=(c=r.trys).length>0&&c[c.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!c||o[1]>c[0]&&o[1]<c[3])){r.label=o[1];break}if(6===o[0]&&r.label<c[1]){r.label=c[1],c=o;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(o);break}c[2]&&r.ops.pop(),r.trys.pop();continue}o=e.call(t,r)}catch(t){o=[6,t],n=0}finally{i=c=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function y(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function B(t,e){return t(e={exports:{}},e.exports),e.exports}var C=function(t){return t&&t.Math==Math&&t},p=C("object"==typeof globalThis&&globalThis)||C("object"==typeof window&&window)||C("object"==typeof self&&self)||C("object"==typeof b&&b)||function(){return this}()||Function("return this")(),m=function(t){try{return!!t()}catch(t){return!0}},h=!m((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),f={}.propertyIsEnumerable,F=Object.getOwnPropertyDescriptor,Z={f:F&&!f.call({1:2},1)?function(t){var e=F(this,t);return!!e&&e.enumerable}:f},V=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},U={}.toString,X=function(t){return U.call(t).slice(8,-1)},G="".split,S=m((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==X(t)?G.call(t,""):Object(t)}:Object,v=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},Q=function(t){return S(v(t))},x=function(t){return"object"==typeof t?null!==t:"function"==typeof t},R=function(t,e){if(!x(t))return t;var i,n;if(e&&"function"==typeof(i=t.toString)&&!x(n=i.call(t)))return n;if("function"==typeof(i=t.valueOf)&&!x(n=i.call(t)))return n;if(!e&&"function"==typeof(i=t.toString)&&!x(n=i.call(t)))return n;throw TypeError("Can't convert object to primitive value")},A={}.hasOwnProperty,J=function(t,e){return A.call(t,e)},W=p.document,H=x(W)&&x(W.createElement),w=function(t){return H?W.createElement(t):{}},L=!h&&!m((function(){return 7!=Object.defineProperty(w("div"),"a",{get:function(){return 7}}).a})),Y=Object.getOwnPropertyDescriptor,k={f:h?Y:function(t,e){if(t=Q(t),e=R(e,!0),L)try{return Y(t,e)}catch(t){}if(J(t,e))return V(!Z.f.call(t,e),t[e])}},N=function(t){if(!x(t))throw TypeError(String(t)+" is not an object");return t},E=Object.defineProperty,T={f:h?E:function(t,e,i){if(N(t),e=R(e,!0),N(i),L)try{return E(t,e,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},K=h?function(t,e,i){return T.f(t,e,V(1,i))}:function(t,e,i){return t[e]=i,t},z=function(t,e){try{K(p,t,e)}catch(i){p[t]=e}return e},D=p["__core-js_shared__"]||z("__core-js_shared__",{}),O=Function.toString;"function"!=typeof D.inspectSource&&(D.inspectSource=function(t){return O.call(t)});var P,j,M,_=D.inspectSource,q=p.WeakMap,$="function"==typeof q&&/native code/.test(_(q)),tt=B((function(t){(t.exports=function(t,e){return D[t]||(D[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.8.0",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),et=0,it=Math.random(),nt=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++et+it).toString(36)},ct=tt("keys"),ot=function(t){return ct[t]||(ct[t]=nt(t))},rt={},st=p.WeakMap;if($){var lt=D.state||(D.state=new st),ut=lt.get,at=lt.has,It=lt.set;P=function(t,e){return e.facade=t,It.call(lt,t,e),e},j=function(t){return ut.call(lt,t)||{}},M=function(t){return at.call(lt,t)}}else{var gt=ot("state");rt[gt]=!0,P=function(t,e){return e.facade=t,K(t,gt,e),e},j=function(t){return J(t,gt)?t[gt]:{}},M=function(t){return J(t,gt)}}var dt,bt={set:P,get:j,has:M,enforce:function(t){return M(t)?j(t):P(t,{})},getterFor:function(t){return function(e){var i;if(!x(e)||(i=j(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}}},yt=B((function(t){var e=bt.get,i=bt.enforce,n=String(String).split("String");(t.exports=function(t,e,c,o){var r,s=!!o&&!!o.unsafe,l=!!o&&!!o.enumerable,u=!!o&&!!o.noTargetGet;"function"==typeof c&&("string"!=typeof e||J(c,"name")||K(c,"name",e),(r=i(c)).source||(r.source=n.join("string"==typeof e?e:""))),t!==p?(s?!u&&t[e]&&(l=!0):delete t[e],l?t[e]=c:K(t,e,c)):l?t[e]=c:z(e,c)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||_(this)}))})),Bt=p,Ct=function(t){return"function"==typeof t?t:void 0},pt=function(t,e){return arguments.length<2?Ct(Bt[t])||Ct(p[t]):Bt[t]&&Bt[t][e]||p[t]&&p[t][e]},mt=Math.ceil,ht=Math.floor,ft=function(t){return isNaN(t=+t)?0:(t>0?ht:mt)(t)},Ft=Math.min,Zt=function(t){return t>0?Ft(ft(t),9007199254740991):0},Vt=Math.max,Ut=Math.min,Xt=function(t){return function(e,i,n){var c,o=Q(e),r=Zt(o.length),s=function(t,e){var i=ft(t);return i<0?Vt(i+e,0):Ut(i,e)}(n,r);if(t&&i!=i){for(;r>s;)if((c=o[s++])!=c)return!0}else for(;r>s;s++)if((t||s in o)&&o[s]===i)return t||s||0;return!t&&-1}},Gt={includes:Xt(!0),indexOf:Xt(!1)},St=Gt.indexOf,vt=function(t,e){var i,n=Q(t),c=0,o=[];for(i in n)!J(rt,i)&&J(n,i)&&o.push(i);for(;e.length>c;)J(n,i=e[c++])&&(~St(o,i)||o.push(i));return o},Qt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xt=Qt.concat("length","prototype"),Rt={f:Object.getOwnPropertyNames||function(t){return vt(t,xt)}},At={f:Object.getOwnPropertySymbols},Jt=pt("Reflect","ownKeys")||function(t){var e=Rt.f(N(t)),i=At.f;return i?e.concat(i(t)):e},Wt=function(t,e){for(var i=Jt(e),n=T.f,c=k.f,o=0;o<i.length;o++){var r=i[o];J(t,r)||n(t,r,c(e,r))}},Ht=/#|\.prototype\./,wt=function(t,e){var i=Yt[Lt(t)];return i==Nt||i!=kt&&("function"==typeof e?m(e):!!e)},Lt=wt.normalize=function(t){return String(t).replace(Ht,".").toLowerCase()},Yt=wt.data={},kt=wt.NATIVE="N",Nt=wt.POLYFILL="P",Et=wt,Tt=k.f,Kt=function(t,e){var i,n,c,o,r,s=t.target,l=t.global,u=t.stat;if(i=l?p:u?p[s]||z(s,{}):(p[s]||{}).prototype)for(n in e){if(o=e[n],c=t.noTargetGet?(r=Tt(i,n))&&r.value:i[n],!Et(l?n:s+(u?".":"#")+n,t.forced)&&void 0!==c){if(typeof o==typeof c)continue;Wt(o,c)}(t.sham||c&&c.sham)&&K(o,"sham",!0),yt(i,n,o,t)}},zt=!!Object.getOwnPropertySymbols&&!m((function(){return!String(Symbol())})),Dt=zt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ot=tt("wks"),Pt=p.Symbol,jt=Dt?Pt:Pt&&Pt.withoutSetter||nt,Mt=function(t){return J(Ot,t)||(zt&&J(Pt,t)?Ot[t]=Pt[t]:Ot[t]=jt("Symbol."+t)),Ot[t]},_t=Mt("match"),qt=function(t){if(function(t){var e;return x(t)&&(void 0!==(e=t[_t])?!!e:"RegExp"==X(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},$t=Mt("match"),te=function(t){var e=/./;try{"/./"[t](e)}catch(i){try{return e[$t]=!1,"/./"[t](e)}catch(t){}}return!1},ee=k.f,ie="".startsWith,ne=Math.min,ce=te("startsWith"),oe=!(ce||(dt=ee(String.prototype,"startsWith"),!dt||dt.writable));Kt({target:"String",proto:!0,forced:!oe&&!ce},{startsWith:function(t){var e=String(v(this));qt(t);var i=Zt(ne(arguments.length>1?arguments[1]:void 0,e.length)),n=String(t);return ie?ie.call(e,n,i):e.slice(i,i+n.length)===n}});var re,se,le=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},ue=function(t,e,i){if(le(t),void 0===e)return t;switch(i){case 0:return function(){return t.call(e)};case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,c){return t.call(e,i,n,c)}}return function(){return t.apply(e,arguments)}},ae=Function.call,Ie=function(t,e,i){return ue(ae,p[t].prototype[e],i)},ge=(Ie("String","startsWith"),Array.isArray||function(t){return"Array"==X(t)}),de=function(t){return Object(v(t))},be=function(t,e,i){var n=R(e);n in t?T.f(t,n,V(0,i)):t[n]=i},ye=Mt("species"),Be=function(t,e){var i;return ge(t)&&("function"!=typeof(i=t.constructor)||i!==Array&&!ge(i.prototype)?x(i)&&null===(i=i[ye])&&(i=void 0):i=void 0),new(void 0===i?Array:i)(0===e?0:e)},Ce=pt("navigator","userAgent")||"",pe=p.process,me=pe&&pe.versions,he=me&&me.v8;he?se=(re=he.split("."))[0]+re[1]:Ce&&(!(re=Ce.match(/Edge\/(\d+)/))||re[1]>=74)&&(re=Ce.match(/Chrome\/(\d+)/))&&(se=re[1]);var fe=se&&+se,Fe=Mt("species"),Ze=Mt("isConcatSpreadable"),Ve=fe>=51||!m((function(){var t=[];return t[Ze]=!1,t.concat()[0]!==t})),Ue=fe>=51||!m((function(){var t=[];return(t.constructor={})[Fe]=function(){return{foo:1}},1!==t.concat(Boolean).foo})),Xe=function(t){if(!x(t))return!1;var e=t[Ze];return void 0!==e?!!e:ge(t)};Kt({target:"Array",proto:!0,forced:!Ve||!Ue},{concat:function(t){var e,i,n,c,o,r=de(this),s=Be(r,0),l=0;for(e=-1,n=arguments.length;e<n;e++)if(Xe(o=-1===e?r:arguments[e])){if(l+(c=Zt(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(i=0;i<c;i++,l++)i in o&&be(s,l,o[i])}else{if(l>=9007199254740991)throw TypeError("Maximum allowed index exceeded");be(s,l++,o)}return s.length=l,s}});var Ge={};Ge[Mt("toStringTag")]="z";var Se="[object z]"===String(Ge),ve=Mt("toStringTag"),Qe="Arguments"==X(function(){return arguments}()),xe=Se?X:function(t){var e,i,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),ve))?i:Qe?X(e):"Object"==(n=X(e))&&"function"==typeof e.callee?"Arguments":n},Re=Se?{}.toString:function(){return"[object "+xe(this)+"]"};Se||yt(Object.prototype,"toString",Re,{unsafe:!0});var Ae,Je=Object.keys||function(t){return vt(t,Qt)},We=h?Object.defineProperties:function(t,e){N(t);for(var i,n=Je(e),c=n.length,o=0;c>o;)T.f(t,i=n[o++],e[i]);return t},He=pt("document","documentElement"),we=ot("IE_PROTO"),Le=function(){},Ye=function(t){return"<script>"+t+"<\/script>"},ke=function(){try{Ae=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;ke=Ae?function(t){t.write(Ye("")),t.close();var e=t.parentWindow.Object;return t=null,e}(Ae):((e=w("iframe")).style.display="none",He.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Ye("document.F=Object")),t.close(),t.F);for(var i=Qt.length;i--;)delete ke.prototype[Qt[i]];return ke()};rt[we]=!0;var Ne=Object.create||function(t,e){var i;return null!==t?(Le.prototype=N(t),i=new Le,Le.prototype=null,i[we]=t):i=ke(),void 0===e?i:We(i,e)},Ee=Rt.f,Te={}.toString,Ke="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ze={f:function(t){return Ke&&"[object Window]"==Te.call(t)?function(t){try{return Ee(t)}catch(t){return Ke.slice()}}(t):Ee(Q(t))}},De={f:Mt},Oe=T.f,Pe=function(t){var e=Bt.Symbol||(Bt.Symbol={});J(e,t)||Oe(e,t,{value:De.f(t)})},je=T.f,Me=Mt("toStringTag"),_e=function(t,e,i){t&&!J(t=i?t:t.prototype,Me)&&je(t,Me,{configurable:!0,value:e})},qe=[].push,$e=function(t){var e=1==t,i=2==t,n=3==t,c=4==t,o=6==t,r=7==t,s=5==t||o;return function(l,u,a,I){for(var g,d,b=de(l),y=S(b),B=ue(u,a,3),C=Zt(y.length),p=0,m=I||Be,h=e?m(l,C):i||r?m(l,0):void 0;C>p;p++)if((s||p in y)&&(d=B(g=y[p],p,b),t))if(e)h[p]=d;else if(d)switch(t){case 3:return!0;case 5:return g;case 6:return p;case 2:qe.call(h,g)}else switch(t){case 4:return!1;case 7:qe.call(h,g)}return o?-1:n||c?c:h}},ti=[$e(0),$e(1),$e(2),$e(3),$e(4),$e(5),$e(6),$e(7)][0],ei=ot("hidden"),ii=Mt("toPrimitive"),ni=bt.set,ci=bt.getterFor("Symbol"),oi=Object.prototype,ri=p.Symbol,si=pt("JSON","stringify"),li=k.f,ui=T.f,ai=ze.f,Ii=Z.f,gi=tt("symbols"),di=tt("op-symbols"),bi=tt("string-to-symbol-registry"),yi=tt("symbol-to-string-registry"),Bi=tt("wks"),Ci=p.QObject,pi=!Ci||!Ci.prototype||!Ci.prototype.findChild,mi=h&&m((function(){return 7!=Ne(ui({},"a",{get:function(){return ui(this,"a",{value:7}).a}})).a}))?function(t,e,i){var n=li(oi,e);n&&delete oi[e],ui(t,e,i),n&&t!==oi&&ui(oi,e,n)}:ui,hi=function(t,e){var i=gi[t]=Ne(ri.prototype);return ni(i,{type:"Symbol",tag:t,description:e}),h||(i.description=e),i},fi=Dt?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof ri},Fi=function(t,e,i){t===oi&&Fi(di,e,i),N(t);var n=R(e,!0);return N(i),J(gi,n)?(i.enumerable?(J(t,ei)&&t[ei][n]&&(t[ei][n]=!1),i=Ne(i,{enumerable:V(0,!1)})):(J(t,ei)||ui(t,ei,V(1,{})),t[ei][n]=!0),mi(t,n,i)):ui(t,n,i)},Zi=function(t,e){N(t);var i=Q(e),n=Je(i).concat(Gi(i));return ti(n,(function(e){h&&!Vi.call(i,e)||Fi(t,e,i[e])})),t},Vi=function(t){var e=R(t,!0),i=Ii.call(this,e);return!(this===oi&&J(gi,e)&&!J(di,e))&&(!(i||!J(this,e)||!J(gi,e)||J(this,ei)&&this[ei][e])||i)},Ui=function(t,e){var i=Q(t),n=R(e,!0);if(i!==oi||!J(gi,n)||J(di,n)){var c=li(i,n);return!c||!J(gi,n)||J(i,ei)&&i[ei][n]||(c.enumerable=!0),c}},Xi=function(t){var e=ai(Q(t)),i=[];return ti(e,(function(t){J(gi,t)||J(rt,t)||i.push(t)})),i},Gi=function(t){var e=t===oi,i=ai(e?di:Q(t)),n=[];return ti(i,(function(t){!J(gi,t)||e&&!J(oi,t)||n.push(gi[t])})),n};if(zt||(yt((ri=function(){if(this instanceof ri)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=nt(t),i=function(t){this===oi&&i.call(di,t),J(this,ei)&&J(this[ei],e)&&(this[ei][e]=!1),mi(this,e,V(1,t))};return h&&pi&&mi(oi,e,{configurable:!0,set:i}),hi(e,t)}).prototype,"toString",(function(){return ci(this).tag})),yt(ri,"withoutSetter",(function(t){return hi(nt(t),t)})),Z.f=Vi,T.f=Fi,k.f=Ui,Rt.f=ze.f=Xi,At.f=Gi,De.f=function(t){return hi(Mt(t),t)},h&&(ui(ri.prototype,"description",{configurable:!0,get:function(){return ci(this).description}}),yt(oi,"propertyIsEnumerable",Vi,{unsafe:!0}))),Kt({global:!0,wrap:!0,forced:!zt,sham:!zt},{Symbol:ri}),ti(Je(Bi),(function(t){Pe(t)})),Kt({target:"Symbol",stat:!0,forced:!zt},{for:function(t){var e=String(t);if(J(bi,e))return bi[e];var i=ri(e);return bi[e]=i,yi[i]=e,i},keyFor:function(t){if(!fi(t))throw TypeError(t+" is not a symbol");if(J(yi,t))return yi[t]},useSetter:function(){pi=!0},useSimple:function(){pi=!1}}),Kt({target:"Object",stat:!0,forced:!zt,sham:!h},{create:function(t,e){return void 0===e?Ne(t):Zi(Ne(t),e)},defineProperty:Fi,defineProperties:Zi,getOwnPropertyDescriptor:Ui}),Kt({target:"Object",stat:!0,forced:!zt},{getOwnPropertyNames:Xi,getOwnPropertySymbols:Gi}),Kt({target:"Object",stat:!0,forced:m((function(){At.f(1)}))},{getOwnPropertySymbols:function(t){return At.f(de(t))}}),si){var Si=!zt||m((function(){var t=ri();return"[null]"!=si([t])||"{}"!=si({a:t})||"{}"!=si(Object(t))}));Kt({target:"JSON",stat:!0,forced:Si},{stringify:function(t,e,i){for(var n,c=[t],o=1;arguments.length>o;)c.push(arguments[o++]);if(n=e,(x(e)||void 0!==t)&&!fi(t))return ge(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!fi(e))return e}),c[1]=e,si.apply(null,c)}})}ri.prototype[ii]||K(ri.prototype,ii,ri.prototype.valueOf),_e(ri,"Symbol"),rt[ei]=!0,Pe("asyncIterator");var vi=T.f,Qi=p.Symbol;if(h&&"function"==typeof Qi&&(!("description"in Qi.prototype)||void 0!==Qi().description)){var xi={},Ri=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof Ri?new Qi(t):void 0===t?Qi():Qi(t);return""===t&&(xi[e]=!0),e};Wt(Ri,Qi);var Ai=Ri.prototype=Qi.prototype;Ai.constructor=Ri;var Ji=Ai.toString,Wi="Symbol(test)"==String(Qi("test")),Hi=/^Symbol\((.*)\)[^)]+$/;vi(Ai,"description",{configurable:!0,get:function(){var t=x(this)?this.valueOf():this,e=Ji.call(t);if(J(xi,t))return"";var i=Wi?e.slice(7,-1):e.replace(Hi,"$1");return""===i?void 0:i}}),Kt({global:!0,forced:!0},{Symbol:Ri})}Pe("hasInstance"),Pe("isConcatSpreadable"),Pe("iterator"),Pe("match"),Pe("matchAll"),Pe("replace"),Pe("search"),Pe("species"),Pe("split"),Pe("toPrimitive"),Pe("toStringTag"),Pe("unscopables"),_e(p.JSON,"JSON",!0),_e(Math,"Math",!0),Kt({global:!0},{Reflect:{}}),_e(p.Reflect,"Reflect",!0),Bt.Symbol;var wi,Li,Yi,ki=function(t){return function(e,i){var n,c,o=String(v(e)),r=ft(i),s=o.length;return r<0||r>=s?t?"":void 0:(n=o.charCodeAt(r))<55296||n>56319||r+1===s||(c=o.charCodeAt(r+1))<56320||c>57343?t?o.charAt(r):n:t?o.slice(r,r+2):c-56320+(n-55296<<10)+65536}},Ni={codeAt:ki(!1),charAt:ki(!0)},Ei=!m((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Ti=ot("IE_PROTO"),Ki=Object.prototype,zi=Ei?Object.getPrototypeOf:function(t){return t=de(t),J(t,Ti)?t[Ti]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Ki:null},Di=Mt("iterator"),Oi=!1;[].keys&&("next"in(Yi=[].keys())?(Li=zi(zi(Yi)))!==Object.prototype&&(wi=Li):Oi=!0),null==wi&&(wi={}),J(wi,Di)||K(wi,Di,(function(){return this}));var Pi={IteratorPrototype:wi,BUGGY_SAFARI_ITERATORS:Oi},ji={},Mi=Pi.IteratorPrototype,_i=function(){return this},qi=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(i,[]),e=i instanceof Array}catch(t){}return function(i,n){return N(i),function(t){if(!x(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(n),e?t.call(i,n):i.__proto__=n,i}}():void 0),$i=Pi.IteratorPrototype,tn=Pi.BUGGY_SAFARI_ITERATORS,en=Mt("iterator"),nn=function(){return this},cn=function(t,e,i,n,c,o,r){!function(t,e,i){var n=e+" Iterator";t.prototype=Ne(Mi,{next:V(1,i)}),_e(t,n,!1),ji[n]=_i}(i,e,n);var s,l,u,a=function(t){if(t===c&&y)return y;if(!tn&&t in d)return d[t];switch(t){case"keys":case"values":case"entries":return function(){return new i(this,t)}}return function(){return new i(this)}},I=e+" Iterator",g=!1,d=t.prototype,b=d[en]||d["@@iterator"]||c&&d[c],y=!tn&&b||a(c),B="Array"==e&&d.entries||b;if(B&&(s=zi(B.call(new t)),$i!==Object.prototype&&s.next&&(zi(s)!==$i&&(qi?qi(s,$i):"function"!=typeof s[en]&&K(s,en,nn)),_e(s,I,!0))),"values"==c&&b&&"values"!==b.name&&(g=!0,y=function(){return b.call(this)}),d[en]!==y&&K(d,en,y),ji[e]=y,c)if(l={values:a("values"),keys:o?y:a("keys"),entries:a("entries")},r)for(u in l)(tn||g||!(u in d))&&yt(d,u,l[u]);else Kt({target:e,proto:!0,forced:tn||g},l);return l},on=Ni.charAt,rn=bt.set,sn=bt.getterFor("String Iterator");cn(String,"String",(function(t){rn(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=sn(this),i=e.string,n=e.index;return n>=i.length?{value:void 0,done:!0}:(t=on(i,n),e.index+=t.length,{value:t,done:!1})}));var ln=function(t){var e=t.return;if(void 0!==e)return N(e.call(t)).value},un=function(t,e,i,n){try{return n?e(N(i)[0],i[1]):e(i)}catch(e){throw ln(t),e}},an=Mt("iterator"),In=Array.prototype,gn=function(t){return void 0!==t&&(ji.Array===t||In[an]===t)},dn=Mt("iterator"),bn=function(t){if(null!=t)return t[dn]||t["@@iterator"]||ji[xe(t)]},yn=Mt("iterator"),Bn=!1;try{var Cn=0,pn={next:function(){return{done:!!Cn++}},return:function(){Bn=!0}};pn[yn]=function(){return this},Array.from(pn,(function(){throw 2}))}catch(l){}var mn=function(t,e){if(!e&&!Bn)return!1;var i=!1;try{var n={};n[yn]=function(){return{next:function(){return{done:i=!0}}}},t(n)}catch(t){}return i},hn=!mn((function(t){Array.from(t)}));Kt({target:"Array",stat:!0,forced:hn},{from:function(t){var e,i,n,c,o,r,s=de(t),l="function"==typeof this?this:Array,u=arguments.length,a=u>1?arguments[1]:void 0,I=void 0!==a,g=bn(s),d=0;if(I&&(a=ue(a,u>2?arguments[2]:void 0,2)),null==g||l==Array&&gn(g))for(i=new l(e=Zt(s.length));e>d;d++)r=I?a(s[d],d):s[d],be(i,d,r);else for(o=(c=g.call(s)).next,i=new l;!(n=o.call(c)).done;d++)r=I?un(c,a,[n.value,d],!0):n.value,be(i,d,r);return i.length=d,i}}),Bt.Array.from;var fn,Fn="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Zn=T.f,Vn=p.Int8Array,Un=Vn&&Vn.prototype,Xn=p.Uint8ClampedArray,Gn=Xn&&Xn.prototype,Sn=Vn&&zi(Vn),vn=Un&&zi(Un),Qn=Object.prototype,xn=Qn.isPrototypeOf,Rn=Mt("toStringTag"),An=nt("TYPED_ARRAY_TAG"),Jn=Fn&&!!qi&&"Opera"!==xe(p.opera),Wn={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8};for(fn in Wn)p[fn]||(Jn=!1);if((!Jn||"function"!=typeof Sn||Sn===Function.prototype)&&(Sn=function(){throw TypeError("Incorrect invocation")},Jn))for(fn in Wn)p[fn]&&qi(p[fn],Sn);if((!Jn||!vn||vn===Qn)&&(vn=Sn.prototype,Jn))for(fn in Wn)p[fn]&&qi(p[fn].prototype,vn);if(Jn&&zi(Gn)!==vn&&qi(Gn,vn),h&&!J(vn,Rn))for(fn in Zn(vn,Rn,{get:function(){return x(this)?this[An]:void 0}}),Wn)p[fn]&&K(p[fn],An,fn);var Hn=Mt("species"),wn=function(t){if(function(t){return x(t)&&J(Wn,xe(t))}(t))return t;throw TypeError("Target is not a typed array")},Ln=function(t){if(qi){if(xn.call(Sn,t))return t}else for(var e in Wn)if(J(Wn,fn)){var i=p[e];if(i&&(t===i||xn.call(i,t)))return t}throw TypeError("Target is not a typed array constructor")},Yn=[].slice;!function(t,e,i){if(h){if(i)for(var n in Wn){var c=p[n];c&&J(c.prototype,t)&&delete c.prototype[t]}vn[t]&&!i||yt(vn,t,i?e:Jn&&Un[t]||e)}}("slice",(function(t,e){for(var i=Yn.call(wn(this),t,e),n=function(t,e){var i,n=N(t).constructor;return void 0===n||null==(i=N(n)[Hn])?e:le(i)}(this,this.constructor),c=0,o=i.length,r=new(Ln(n))(o);o>c;)r[c]=i[c++];return r}),m((function(){new Int8Array(1).slice()})));var kn=Mt("unscopables"),Nn=Array.prototype;null==Nn[kn]&&T.f(Nn,kn,{configurable:!0,value:Ne(null)});var En=function(t){Nn[kn][t]=!0},Tn=Object.defineProperty,Kn={},zn=function(t){throw t},Dn=Gt.includes,On=function(t,e){if(J(Kn,t))return Kn[t];e||(e={});var i=[][t],n=!!J(e,"ACCESSORS")&&e.ACCESSORS,c=J(e,0)?e[0]:zn,o=J(e,1)?e[1]:void 0;return Kn[t]=!!i&&!m((function(){if(n&&!h)return!0;var t={length:-1};n?Tn(t,1,{enumerable:!0,get:zn}):t[1]=1,i.call(t,c,o)}))}("indexOf",{ACCESSORS:!0,1:0});Kt({target:"Array",proto:!0,forced:!On},{includes:function(t){return Dn(this,t,arguments.length>1?arguments[1]:void 0)}}),En("includes"),Ie("Array","includes"),Kt({target:"String",proto:!0,forced:!te("includes")},{includes:function(t){return!!~String(v(this)).indexOf(qt(t),arguments.length>1?arguments[1]:void 0)}}),Ie("String","includes");var Pn=!m((function(){return Object.isExtensible(Object.preventExtensions({}))})),jn=B((function(t){var e=T.f,i=nt("meta"),n=0,c=Object.isExtensible||function(){return!0},o=function(t){e(t,i,{value:{objectID:"O"+ ++n,weakData:{}}})},r=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!x(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!J(t,i)){if(!c(t))return"F";if(!e)return"E";o(t)}return t[i].objectID},getWeakData:function(t,e){if(!J(t,i)){if(!c(t))return!0;if(!e)return!1;o(t)}return t[i].weakData},onFreeze:function(t){return Pn&&r.REQUIRED&&c(t)&&!J(t,i)&&o(t),t}};rt[i]=!0})),Mn=(jn.REQUIRED,jn.fastKey,jn.getWeakData,jn.onFreeze,function(t,e){this.stopped=t,this.result=e}),_n=function(t,e,i){var n,c,o,r,s,l,u,a=i&&i.that,I=!(!i||!i.AS_ENTRIES),g=!(!i||!i.IS_ITERATOR),d=!(!i||!i.INTERRUPTED),b=ue(e,a,1+I+d),y=function(t){return n&&ln(n),new Mn(!0,t)},B=function(t){return I?(N(t),d?b(t[0],t[1],y):b(t[0],t[1])):d?b(t,y):b(t)};if(g)n=t;else{if("function"!=typeof(c=bn(t)))throw TypeError("Target is not iterable");if(gn(c)){for(o=0,r=Zt(t.length);r>o;o++)if((s=B(t[o]))&&s instanceof Mn)return s;return new Mn(!1)}n=c.call(t)}for(l=n.next;!(u=l.call(n)).done;){try{s=B(u.value)}catch(t){throw ln(n),t}if("object"==typeof s&&s&&s instanceof Mn)return s}return new Mn(!1)},qn=function(t,e,i){if(!(t instanceof e))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return t},$n=function(t,e,i){for(var n in e)yt(t,n,e[n],i);return t},tc=Mt("species"),ec=T.f,ic=jn.fastKey,nc=bt.set,cc=bt.getterFor,oc=(function(t,e,i){var n=-1!==t.indexOf("Map"),c=-1!==t.indexOf("Weak"),o=n?"set":"add",r=p.Set,s=r&&r.prototype,l=r,u={},a=function(t){var e=s[t];yt(s,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(c&&!x(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return c&&!x(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(c&&!x(t))&&e.call(this,0===t?0:t)}:function(t,i){return e.call(this,0===t?0:t,i),this})};if(Et(t,"function"!=typeof r||!(c||s.forEach&&!m((function(){(new r).entries().next()})))))l=i.getConstructor(e,t,n,o),jn.REQUIRED=!0;else if(Et(t,!0)){var I=new l,g=I[o](c?{}:-0,1)!=I,d=m((function(){I.has(1)})),b=mn((function(t){new r(t)})),y=!c&&m((function(){for(var t=new r,e=5;e--;)t[o](e,e);return!t.has(-0)}));b||((l=e((function(e,i){qn(e,l,t);var c=function(t,e,i){var n,c;return qi&&"function"==typeof(n=e.constructor)&&n!==i&&x(c=n.prototype)&&c!==i.prototype&&qi(t,c),t}(new r,e,l);return null!=i&&_n(i,c[o],{that:c,AS_ENTRIES:n}),c}))).prototype=s,s.constructor=l),(d||y)&&(a("delete"),a("has"),n&&a("get")),(y||g)&&a(o),c&&s.clear&&delete s.clear}u.Set=l,Kt({global:!0,forced:l!=r},u),_e(l,t),c||i.setStrong(l,t,n)}("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),{getConstructor:function(t,e,i,n){var c=t((function(t,o){qn(t,c,e),nc(t,{type:e,index:Ne(null),first:void 0,last:void 0,size:0}),h||(t.size=0),null!=o&&_n(o,t[n],{that:t,AS_ENTRIES:i})})),o=cc(e),r=function(t,e,i){var n,c,r=o(t),l=s(t,e);return l?l.value=i:(r.last=l={index:c=ic(e,!0),key:e,value:i,previous:n=r.last,next:void 0,removed:!1},r.first||(r.first=l),n&&(n.next=l),h?r.size++:t.size++,"F"!==c&&(r.index[c]=l)),t},s=function(t,e){var i,n=o(t),c=ic(e);if("F"!==c)return n.index[c];for(i=n.first;i;i=i.next)if(i.key==e)return i};return $n(c.prototype,{clear:function(){for(var t=o(this),e=t.index,i=t.first;i;)i.removed=!0,i.previous&&(i.previous=i.previous.next=void 0),delete e[i.index],i=i.next;t.first=t.last=void 0,h?t.size=0:this.size=0},delete:function(t){var e=this,i=o(e),n=s(e,t);if(n){var c=n.next,r=n.previous;delete i.index[n.index],n.removed=!0,r&&(r.next=c),c&&(c.previous=r),i.first==n&&(i.first=c),i.last==n&&(i.last=r),h?i.size--:e.size--}return!!n},forEach:function(t){for(var e,i=o(this),n=ue(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:i.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!s(this,t)}}),$n(c.prototype,i?{get:function(t){var e=s(this,t);return e&&e.value},set:function(t,e){return r(this,0===t?0:t,e)}}:{add:function(t){return r(this,t=0===t?0:t,t)}}),h&&ec(c.prototype,"size",{get:function(){return o(this).size}}),c},setStrong:function(t,e,i){var n=e+" Iterator",c=cc(e),o=cc(n);cn(t,e,(function(t,e){nc(this,{type:n,target:t,state:c(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,i=t.last;i&&i.removed;)i=i.previous;return t.target&&(t.last=i=i?i.next:t.state.first)?"keys"==e?{value:i.key,done:!1}:"values"==e?{value:i.value,done:!1}:{value:[i.key,i.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),i?"entries":"values",!i,!0),function(t){var e=pt(t),i=T.f;h&&e&&!e[tc]&&i(e,tc,{configurable:!0,get:function(){return this}})}(e)}}),{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),rc=bt.set,sc=bt.getterFor("Array Iterator"),lc=cn(Array,"Array",(function(t,e){rc(this,{type:"Array Iterator",target:Q(t),index:0,kind:e})}),(function(){var t=sc(this),e=t.target,i=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:n,done:!1}:"values"==i?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");ji.Arguments=ji.Array,En("keys"),En("values"),En("entries");var uc=Mt("iterator"),ac=Mt("toStringTag"),Ic=lc.values;for(var gc in oc){var dc=p[gc],bc=dc&&dc.prototype;if(bc){if(bc[uc]!==Ic)try{K(bc,uc,Ic)}catch(l){bc[uc]=Ic}if(bc[ac]||K(bc,ac,gc),oc[gc])for(var yc in lc)if(bc[yc]!==lc[yc])try{K(bc,yc,lc[yc])}catch(l){bc[yc]=lc[yc]}}}function Bc(t){var e=this.constructor;return this.then((function(i){return e.resolve(t()).then((function(){return i}))}),(function(i){return e.resolve(t()).then((function(){return e.reject(i)}))}))}function Cc(t){return new this((function(e,i){if(!t||void 0===t.length)return i(new TypeError(typeof t+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var n=Array.prototype.slice.call(t);if(0===n.length)return e([]);var c=n.length;function o(t,i){if(i&&("object"==typeof i||"function"==typeof i)){var r=i.then;if("function"==typeof r)return void r.call(i,(function(e){o(t,e)}),(function(i){n[t]={status:"rejected",reason:i},0==--c&&e(n)}))}n[t]={status:"fulfilled",value:i},0==--c&&e(n)}for(var r=0;r<n.length;r++)o(r,n[r])}))}Bt.Set;var pc=setTimeout;function mc(t){return Boolean(t&&void 0!==t.length)}function hc(){}function fc(t){if(!(this instanceof fc))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],Gc(t,this)}function Fc(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,fc._immediateFn((function(){var i=1===t._state?e.onFulfilled:e.onRejected;if(null!==i){var n;try{n=i(t._value)}catch(t){return void Vc(e.promise,t)}Zc(e.promise,n)}else(1===t._state?Zc:Vc)(e.promise,t._value)}))):t._deferreds.push(e)}function Zc(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var i=e.then;if(e instanceof fc)return t._state=3,t._value=e,void Uc(t);if("function"==typeof i)return void Gc((n=i,c=e,function(){n.apply(c,arguments)}),t)}t._state=1,t._value=e,Uc(t)}catch(e){Vc(t,e)}var n,c}function Vc(t,e){t._state=2,t._value=e,Uc(t)}function Uc(t){2===t._state&&0===t._deferreds.length&&fc._immediateFn((function(){t._handled||fc._unhandledRejectionFn(t._value)}));for(var e=0,i=t._deferreds.length;e<i;e++)Fc(t,t._deferreds[e]);t._deferreds=null}function Xc(t,e,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=i}function Gc(t,e){var i=!1;try{t((function(t){i||(i=!0,Zc(e,t))}),(function(t){i||(i=!0,Vc(e,t))}))}catch(t){if(i)return;i=!0,Vc(e,t)}}fc.prototype.catch=function(t){return this.then(null,t)},fc.prototype.then=function(t,e){var i=new this.constructor(hc);return Fc(this,new Xc(t,e,i)),i},fc.prototype.finally=Bc,fc.all=function(t){return new fc((function(e,i){if(!mc(t))return i(new TypeError("Promise.all accepts an array"));var n=Array.prototype.slice.call(t);if(0===n.length)return e([]);var c=n.length;function o(t,r){try{if(r&&("object"==typeof r||"function"==typeof r)){var s=r.then;if("function"==typeof s)return void s.call(r,(function(e){o(t,e)}),i)}n[t]=r,0==--c&&e(n)}catch(t){i(t)}}for(var r=0;r<n.length;r++)o(r,n[r])}))},fc.allSettled=Cc,fc.resolve=function(t){return t&&"object"==typeof t&&t.constructor===fc?t:new fc((function(e){e(t)}))},fc.reject=function(t){return new fc((function(e,i){i(t)}))},fc.race=function(t){return new fc((function(e,i){if(!mc(t))return i(new TypeError("Promise.race accepts an array"));for(var n=0,c=t.length;n<c;n++)fc.resolve(t[n]).then(e,i)}))},fc._immediateFn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){pc(t,0)},fc._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var Sc=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 Sc.Promise?Sc.Promise=fc:Sc.Promise.prototype.finally?Sc.Promise.allSettled||(Sc.Promise.allSettled=Cc):Sc.Promise.prototype.finally=Bc,function(t){function e(){}function i(t,e){if(t=void 0===t?"utf-8":t,e=void 0===e?{fatal:!1}:e,-1===c.indexOf(t.toLowerCase()))throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+t+"') is invalid.");if(e.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}function n(t){for(var e=0,i=Math.min(65536,t.length+1),n=new Uint16Array(i),c=[],o=0;;){var r=e<t.length;if(!r||o>=i-1){if(c.push(String.fromCharCode.apply(null,n.subarray(0,o))),!r)return c.join("");t=t.subarray(e),o=e=0}if(0==(128&(r=t[e++])))n[o++]=r;else if(192==(224&r)){var s=63&t[e++];n[o++]=(31&r)<<6|s}else if(224==(240&r)){s=63&t[e++];var l=63&t[e++];n[o++]=(31&r)<<12|s<<6|l}else 240==(248&r)&&(65535<(r=(7&r)<<18|(s=63&t[e++])<<12|(l=63&t[e++])<<6|63&t[e++])&&(r-=65536,n[o++]=r>>>10&1023|55296,r=56320|1023&r),n[o++]=r)}}if(t.TextEncoder&&t.TextDecoder)return!1;var c=["utf-8","utf8","unicode-1-1-utf-8"];Object.defineProperty(e.prototype,"encoding",{value:"utf-8"}),e.prototype.encode=function(t,e){if((e=void 0===e?{stream:!1}:e).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");e=0;for(var i=t.length,n=0,c=Math.max(32,i+(i>>>1)+7),o=new Uint8Array(c>>>3<<3);e<i;){var r=t.charCodeAt(e++);if(55296<=r&&56319>=r){if(e<i){var s=t.charCodeAt(e);56320==(64512&s)&&(++e,r=((1023&r)<<10)+(1023&s)+65536)}if(55296<=r&&56319>=r)continue}if(n+4>o.length&&(c+=8,c=(c*=1+e/t.length*2)>>>3<<3,(s=new Uint8Array(c)).set(o),o=s),0==(4294967168&r))o[n++]=r;else{if(0==(4294965248&r))o[n++]=r>>>6&31|192;else if(0==(4294901760&r))o[n++]=r>>>12&15|224,o[n++]=r>>>6&63|128;else{if(0!=(4292870144&r))continue;o[n++]=r>>>18&7|240,o[n++]=r>>>12&63|128,o[n++]=r>>>6&63|128}o[n++]=63&r|128}}return o.slice?o.slice(0,n):o.subarray(0,n)},Object.defineProperty(i.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(i.prototype,"fatal",{value:!1}),Object.defineProperty(i.prototype,"ignoreBOM",{value:!1});var o=n;"function"==typeof Buffer&&Buffer.from?o=function(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf-8")}:"function"==typeof Blob&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&(o=function(t){var e=URL.createObjectURL(new Blob([t],{type:"text/plain;charset=UTF-8"}));try{var i=new XMLHttpRequest;return i.open("GET",e,!1),i.send(),i.responseText}catch(e){return n(t)}finally{URL.revokeObjectURL(e)}}),i.prototype.decode=function(t,e){if((e=void 0===e?{stream:!1}:e).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");return t=t instanceof Uint8Array?t:t.buffer instanceof ArrayBuffer?new Uint8Array(t.buffer):new Uint8Array(t),o(t)},t.TextEncoder=e,t.TextDecoder=i}("undefined"!=typeof window?window:b),function(){function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&function(t,e){(Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}(t,e)}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?o(t):e}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=c(t);if(e){var o=c(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return r(this,i)}}function l(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=c(t)););return t}function u(t,e,i){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=l(t,e);if(n){var c=Object.getOwnPropertyDescriptor(n,e);return c.get?c.get.call(i):c.value}})(t,e,i||t)}var a=function(){function e(){t(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return i(e,[{key:"addEventListener",value:function(t,e){t in this.listeners||(this.listeners[t]=[]),this.listeners[t].push(e)}},{key:"removeEventListener",value:function(t,e){if(t in this.listeners)for(var i=this.listeners[t],n=0,c=i.length;n<c;n++)if(i[n]===e)return void i.splice(n,1)}},{key:"dispatchEvent",value:function(t){var e=this;if(t.type in this.listeners){for(var i=function(i){setTimeout((function(){return i.call(e,t)}))},n=this.listeners[t.type],c=0,o=n.length;c<o;c++)i(n[c]);return!t.defaultPrevented}}}]),e}(),I=function(e){n(l,e);var r=s(l);function l(){var e;return t(this,l),(e=r.call(this)).listeners||a.call(o(e)),Object.defineProperty(o(e),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(o(e),"onabort",{value:null,writable:!0,configurable:!0}),e}return i(l,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(t){"abort"===t.type&&(this.aborted=!0,"function"==typeof this.onabort&&this.onabort.call(this,t)),u(c(l.prototype),"dispatchEvent",this).call(this,t)}}]),l}(a),g=function(){function e(){t(this,e),Object.defineProperty(this,"signal",{value:new I,writable:!0,configurable:!0})}return i(e,[{key:"abort",value:function(){var t;try{t=new Event("abort")}catch(e){"undefined"!=typeof document?document.createEvent?(t=document.createEvent("Event")).initEvent("abort",!1,!1):(t=document.createEventObject()).type="abort":t={type:"abort",bubbles:!1,cancelable:!1}}this.signal.dispatchEvent(t)}},{key:"toString",value:function(){return"[object AbortController]"}}]),e}();"undefined"!=typeof Symbol&&Symbol.toStringTag&&(g.prototype[Symbol.toStringTag]="AbortController",I.prototype[Symbol.toStringTag]="AbortSignal"),function(t){(function(t){return t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):"function"==typeof t.Request&&!t.Request.prototype.hasOwnProperty("signal")||!t.AbortController})(t)&&(t.AbortController=g,t.AbortSignal=I)}("undefined"!=typeof self?self:b)}();var vc=B((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){var t=this;this.locked=new Map,this.addToLocked=function(e,i){var n=t.locked.get(e);void 0===n?void 0===i?t.locked.set(e,[]):t.locked.set(e,[i]):void 0!==i&&(n.unshift(i),t.locked.set(e,n))},this.isLocked=function(e){return t.locked.has(e)},this.lock=function(e){return new Promise((function(i,n){t.isLocked(e)?t.addToLocked(e,i):(t.addToLocked(e),i())}))},this.unlock=function(e){var i=t.locked.get(e);if(void 0!==i&&0!==i.length){var n=i.pop();t.locked.set(e,i),void 0!==n&&setTimeout(n,0)}else t.locked.delete(e)}}return t.getInstance=function(){return void 0===t.instance&&(t.instance=new t),t.instance},t}();e.default=function(){return i.getInstance()}}));y(vc);var Qc=y(B((function(t,e){var i=b&&b.__awaiter||function(t,e,i,n){return new(i||(i=Promise))((function(c,o){function r(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){t.done?c(t.value):new i((function(e){e(t.value)})).then(r,s)}l((n=n.apply(t,e||[])).next())}))},n=b&&b.__generator||function(t,e){var i,n,c,o,r={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(c=2&o[0]?n.return:o[0]?n.throw||((c=n.return)&&c.call(n),0):n.next)&&!(c=c.call(n,o[1])).done)return c;switch(n=0,c&&(o=[2&o[0],c.value]),o[0]){case 0:case 1:c=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,n=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!((c=(c=r.trys).length>0&&c[c.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!c||o[1]>c[0]&&o[1]<c[3])){r.label=o[1];break}if(6===o[0]&&r.label<c[1]){r.label=c[1],c=o;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(o);break}c[2]&&r.ops.pop(),r.trys.pop();continue}o=e.call(t,r)}catch(t){o=[6,t],n=0}finally{i=c=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(e,"__esModule",{value:!0});var c="browser-tabs-lock-key";function o(t){return new Promise((function(e){return setTimeout(e,t)}))}function r(t){for(var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",i="",n=0;n<t;n++)i+=e[Math.floor(Math.random()*e.length)];return i}var s=function(){function t(){this.acquiredIatSet=new Set,this.id=Date.now().toString()+r(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===t.waiters&&(t.waiters=[])}return t.prototype.acquireLock=function(e,s){return void 0===s&&(s=5e3),i(this,void 0,void 0,(function(){var i,l,u,a,I,g;return n(this,(function(n){switch(n.label){case 0:i=Date.now()+r(4),l=Date.now()+s,u=c+"-"+e,a=window.localStorage,n.label=1;case 1:return Date.now()<l?[4,o(30)]:[3,8];case 2:return n.sent(),null!==a.getItem(u)?[3,5]:(I=this.id+"-"+e+"-"+i,[4,o(Math.floor(25*Math.random()))]);case 3:return n.sent(),a.setItem(u,JSON.stringify({id:this.id,iat:i,timeoutKey:I,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,o(30)];case 4:return n.sent(),null!==(g=a.getItem(u))&&(g=JSON.parse(g)).id===this.id&&g.iat===i?(this.acquiredIatSet.add(i),this.refreshLockWhileAcquired(u,i),[2,!0]):[3,7];case 5:return t.lockCorrector(),[4,this.waitForSomethingToChange(l)];case 6:n.sent(),n.label=7;case 7:return i=Date.now()+r(4),[3,1];case 8:return[2,!1]}}))}))},t.prototype.refreshLockWhileAcquired=function(t,e){return i(this,void 0,void 0,(function(){var c=this;return n(this,(function(o){return setTimeout((function(){return i(c,void 0,void 0,(function(){var i,c;return n(this,(function(n){switch(n.label){case 0:return[4,vc.default().lock(e)];case 1:return n.sent(),this.acquiredIatSet.has(e)?(i=window.localStorage,null===(c=i.getItem(t))?(vc.default().unlock(e),[2]):((c=JSON.parse(c)).timeRefreshed=Date.now(),i.setItem(t,JSON.stringify(c)),vc.default().unlock(e),this.refreshLockWhileAcquired(t,e),[2])):(vc.default().unlock(e),[2])}}))}))}),1e3),[2]}))}))},t.prototype.waitForSomethingToChange=function(e){return i(this,void 0,void 0,(function(){return n(this,(function(i){switch(i.label){case 0:return[4,new Promise((function(i){var n=!1,c=Date.now(),o=!1;function r(){if(o||(window.removeEventListener("storage",r),t.removeFromWaiting(r),clearTimeout(s),o=!0),!n){n=!0;var e=50-(Date.now()-c);e>0?setTimeout(i,e):i()}}window.addEventListener("storage",r),t.addToWaiting(r);var s=setTimeout(r,Math.max(0,e-Date.now()))}))];case 1:return i.sent(),[2]}}))}))},t.addToWaiting=function(e){this.removeFromWaiting(e),void 0!==t.waiters&&t.waiters.push(e)},t.removeFromWaiting=function(e){void 0!==t.waiters&&(t.waiters=t.waiters.filter((function(t){return t!==e})))},t.notifyWaiters=function(){void 0!==t.waiters&&t.waiters.slice().forEach((function(t){return t()}))},t.prototype.releaseLock=function(t){return i(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,this.releaseLock__private__(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.releaseLock__private__=function(e){return i(this,void 0,void 0,(function(){var i,o,r;return n(this,(function(n){switch(n.label){case 0:return i=window.localStorage,o=c+"-"+e,null===(r=i.getItem(o))?[2]:(r=JSON.parse(r)).id!==this.id?[3,2]:[4,vc.default().lock(r.iat)];case 1:n.sent(),this.acquiredIatSet.delete(r.iat),i.removeItem(o),vc.default().unlock(r.iat),t.notifyWaiters(),n.label=2;case 2:return[2]}}))}))},t.lockCorrector=function(){for(var e=Date.now()-5e3,i=window.localStorage,n=Object.keys(i),o=!1,r=0;r<n.length;r++){var s=n[r];if(s.includes(c)){var l=i.getItem(s);null!==l&&(void 0===(l=JSON.parse(l)).timeRefreshed&&l.timeAcquired<e||void 0!==l.timeRefreshed&&l.timeRefreshed<e)&&(i.removeItem(s),o=!0)}}o&&t.notifyWaiters()},t.waiters=void 0,t}();e.default=s}))),xc={timeoutInSeconds:60},Rc=["login_required","consent_required","interaction_required","account_selection_required","access_denied"],Ac={name:"auth0-spa-js",version:"1.14.0"},Jc=function(t){function e(i,n){var c=t.call(this,n)||this;return c.error=i,c.error_description=n,Object.setPrototypeOf(c,e.prototype),c}return u(e,t),e.fromPayload=function(t){return new e(t.error,t.error_description)},e}(Error),Wc=function(t){function e(i,n,c,o){void 0===o&&(o=null);var r=t.call(this,i,n)||this;return r.state=c,r.appState=o,Object.setPrototypeOf(r,e.prototype),r}return u(e,t),e}(Jc),Hc=function(t){function e(){var i=t.call(this,"timeout","Timeout")||this;return Object.setPrototypeOf(i,e.prototype),i}return u(e,t),e}(Jc),wc=function(t){function e(i){var n=t.call(this)||this;return n.popup=i,Object.setPrototypeOf(n,e.prototype),n}return u(e,t),e}(Hc),Lc=function(t,e,i){return void 0===i&&(i=60),new Promise((function(n,c){var o=window.document.createElement("iframe");o.setAttribute("width","0"),o.setAttribute("height","0"),o.style.display="none";var r,s=function(){window.document.body.contains(o)&&(window.document.body.removeChild(o),window.removeEventListener("message",r,!1))},l=setTimeout((function(){c(new Hc),s()}),1e3*i);r=function(t){if(t.origin==e&&t.data&&"authorization_response"===t.data.type){var i=t.source;i&&i.close(),t.data.response.error?c(Jc.fromPayload(t.data.response)):n(t.data.response),clearTimeout(l),window.removeEventListener("message",r,!1),setTimeout(s,2e3)}},window.addEventListener("message",r,!1),window.document.body.appendChild(o),o.setAttribute("src",t)}))},Yc=function(t,e){var i,n,c,o=e.popup;if(o?o.location.href=t:(i=t,n=window.screenX+(window.innerWidth-400)/2,c=window.screenY+(window.innerHeight-600)/2,o=window.open(i,"auth0:authorize:popup","left="+n+",top="+c+",width=400,height=600,resizable,scrollbars=yes,status=1")),!o)throw new Error("Could not open popup");return new Promise((function(t,i){var n,c=setTimeout((function(){i(new wc(o)),window.removeEventListener("message",n,!1)}),1e3*(e.timeoutInSeconds||60));n=function(e){if(e.data&&"authorization_response"===e.data.type){if(clearTimeout(c),window.removeEventListener("message",n,!1),o.close(),e.data.response.error)return i(Jc.fromPayload(e.data.response));t(e.data.response)}},window.addEventListener("message",n)}))},kc=function(){return window.crypto||window.msCrypto},Nc=function(){var t=kc();return t.subtle||t.webkitSubtle},Ec=function(){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.",e="";return Array.from(kc().getRandomValues(new Uint8Array(43))).forEach((function(i){return e+=t[i%t.length]})),e},Tc=function(t){return btoa(t)},Kc=function(t){return Object.keys(t).filter((function(e){return void 0!==t[e]})).map((function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])})).join("&")},zc=function(t){return g(void 0,void 0,void 0,(function(){var e;return d(this,(function(i){switch(i.label){case 0:return e=Nc().digest({name:"SHA-256"},(new TextEncoder).encode(t)),window.msCrypto?[2,new Promise((function(t,i){e.oncomplete=function(e){t(e.target.result)},e.onerror=function(t){i(t.error)},e.onabort=function(){i("The digest operation was aborted")}}))]:[4,e];case 1:return[2,i.sent()]}}))}))},Dc=function(t){return function(t){return decodeURIComponent(atob(t).split("").map((function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)})).join(""))}(t.replace(/_/g,"/").replace(/-/g,"+"))},Oc=function(t){var e=new Uint8Array(t);return function(t){var e={"+":"-","/":"_","=":""};return t.replace(/[+/=]/g,(function(t){return e[t]}))}(window.btoa(String.fromCharCode.apply(String,Array.from(e))))},Pc=function(t,e){return g(void 0,void 0,void 0,(function(){var i,n;return d(this,(function(c){switch(c.label){case 0:return[4,(o=t,r=e,r=r||{},new Promise((function(t,e){var i=new XMLHttpRequest,n=[],c=[],s={},l=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:l,headers:{keys:function(){return n},entries:function(){return c},get:function(t){return s[t.toLowerCase()]},has:function(t){return t.toLowerCase()in s}}}};for(var u in i.open(r.method||"get",o,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(t,e,i){n.push(e=e.toLowerCase()),c.push([e,i]),s[e]=s[e]?s[e]+","+i:i})),t(l())},i.onerror=e,i.withCredentials="include"==r.credentials,r.headers)i.setRequestHeader(u,r.headers[u]);i.send(r.body||null)})))];case 1:return i=c.sent(),n={ok:i.ok},[4,i.json()];case 2:return[2,(n.json=c.sent(),n)]}var o,r}))}))},jc=function(t,e,i){return g(void 0,void 0,void 0,(function(){var n,c;return d(this,(function(o){return n=new AbortController,e.signal=n.signal,[2,Promise.race([Pc(t,e),new Promise((function(t,e){c=setTimeout((function(){n.abort(),e(new Error("Timeout when executing 'fetch'"))}),i)}))]).finally((function(){clearTimeout(c)}))]}))}))},Mc=function(t,e,i,n,c,o){return g(void 0,void 0,void 0,(function(){return d(this,(function(r){return[2,(s={auth:{audience:e,scope:i},timeout:c,fetchUrl:t,fetchOptions:n},l=o,new Promise((function(t,e){var i=new MessageChannel;i.port1.onmessage=function(i){i.data.error?e(new Error(i.data.error)):t(i.data)},l.postMessage(s,[i.port2])})))];var s,l}))}))},_c=function(t,e,i,n,c,o){return void 0===o&&(o=1e4),g(void 0,void 0,void 0,(function(){return d(this,(function(r){return c?[2,Mc(t,e,i,n,o,c)]:[2,jc(t,n,o)]}))}))};function qc(t,e,i,n,c,o){return g(this,void 0,void 0,(function(){var r,s,l,u,a,g,b,y;return d(this,(function(d){switch(d.label){case 0:r=null,l=0,d.label=1;case 1:if(!(l<3))return[3,6];d.label=2;case 2:return d.trys.push([2,4,,5]),[4,_c(t,i,n,c,o,e)];case 3:return s=d.sent(),r=null,[3,6];case 4:return u=d.sent(),r=u,[3,5];case 5:return l++,[3,1];case 6:if(r)throw r.message=r.message||"Failed to fetch",r;if(a=s.json,g=a.error,b=a.error_description,y=I(a,["error","error_description"]),!s.ok)throw new Jc(g||"request_error",b||"HTTP error. Unable to fetch "+t);return[2,y]}}))}))}function $c(t,e){var i=t.baseUrl,n=t.timeout,c=t.audience,o=t.scope,r=t.auth0Client,s=I(t,["baseUrl","timeout","audience","scope","auth0Client"]);return g(this,void 0,void 0,(function(){return d(this,(function(t){switch(t.label){case 0:return[4,qc(i+"/oauth/token",n,c||"default",o,{method:"POST",body:JSON.stringify(s),headers:{"Content-type":"application/json","Auth0-Client":btoa(JSON.stringify(r||Ac))}},e)];case 1:return[2,t.sent()]}}))}))}var to=function(t){return Array.from(new Set(t))},eo=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return to(t.join(" ").trim().split(/\s+/)).join(" ")},io=function(){function t(t,e){void 0===e&&(e=no),this.prefix=e,this.client_id=t.client_id,this.scope=t.scope,this.audience=t.audience}return t.prototype.toKey=function(){return this.prefix+"::"+this.client_id+"::"+this.audience+"::"+this.scope},t.fromKey=function(e){var i=e.split("::"),n=i[0],c=i[1],o=i[2];return new t({client_id:c,scope:i[3],audience:o},n)},t}(),no="@@auth0spajs@@",co=function(t){var e=Math.floor(Date.now()/1e3)+t.expires_in;return{body:t,expiresAt:Math.min(e,t.decodedToken.claims.exp)}},oo=function(t,e){var i=t.client_id,n=t.audience,c=t.scope;return e.filter((function(t){var e=io.fromKey(t),o=e.prefix,r=e.client_id,s=e.audience,l=e.scope,u=l&&l.split(" "),a=l&&c.split(" ").reduce((function(t,e){return t&&u.includes(e)}),!0);return o===no&&r===i&&s===n&&a}))[0]},ro=function(){function t(){}return t.prototype.save=function(t){var e=new io({client_id:t.client_id,scope:t.scope,audience:t.audience}),i=co(t);window.localStorage.setItem(e.toKey(),JSON.stringify(i))},t.prototype.get=function(t,e){void 0===e&&(e=0);var i=this.readJson(t),n=Math.floor(Date.now()/1e3);if(i){if(!(i.expiresAt-e<n))return i.body;if(i.body.refresh_token){var c=this.stripData(i);return this.writeJson(t.toKey(),c),c.body}localStorage.removeItem(t.toKey())}},t.prototype.clear=function(){for(var t=localStorage.length-1;t>=0;t--)localStorage.key(t).startsWith(no)&&localStorage.removeItem(localStorage.key(t))},t.prototype.readJson=function(t){var e,i=oo(t,Object.keys(window.localStorage)),n=i&&window.localStorage.getItem(i);if(n&&(e=JSON.parse(n)))return e},t.prototype.writeJson=function(t,e){localStorage.setItem(t,JSON.stringify(e))},t.prototype.stripData=function(t){return{body:{refresh_token:t.body.refresh_token},expiresAt:t.expiresAt}},t}(),so=function(){this.enclosedCache=function(){var t={};return{save:function(e){var i=new io({client_id:e.client_id,scope:e.scope,audience:e.audience}),n=co(e);t[i.toKey()]=n},get:function(e,i){void 0===i&&(i=0);var n=oo(e,Object.keys(t)),c=t[n],o=Math.floor(Date.now()/1e3);if(c)return c.expiresAt-i<o?c.body.refresh_token?(c.body={refresh_token:c.body.refresh_token},c.body):void delete t[e.toKey()]:c.body},clear:function(){t={}}}}()},lo=function(){function t(t){this.storage=t,this.transaction=this.storage.get("a0.spajs.txs")}return t.prototype.create=function(t){this.transaction=t,this.storage.save("a0.spajs.txs",t,{daysUntilExpire:1})},t.prototype.get=function(){return this.transaction},t.prototype.remove=function(){delete this.transaction,this.storage.remove("a0.spajs.txs")},t}(),uo=function(t){return"number"==typeof t},ao=["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"],Io=B((function(t,e){var i=b&&b.__assign||function(){return(i=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var c in e=arguments[i])Object.prototype.hasOwnProperty.call(e,c)&&(t[c]=e[c]);return t}).apply(this,arguments)};function n(t,e){if(!e)return"";var i="; "+t;return!0===e?i:i+"="+e}function c(t,e,i){return encodeURIComponent(t).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(e).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(t){if("number"==typeof t.expires){var e=new Date;e.setMilliseconds(e.getMilliseconds()+864e5*t.expires),t.expires=e}return n("Expires",t.expires?t.expires.toUTCString():"")+n("Domain",t.domain)+n("Path",t.path)+n("Secure",t.secure)+n("SameSite",t.sameSite)}(i)}function o(t){for(var e={},i=t?t.split("; "):[],n=/(%[\dA-F]{2})+/gi,c=0;c<i.length;c++){var o=i[c].split("="),r=o.slice(1).join("=");'"'===r.charAt(0)&&(r=r.slice(1,-1));try{e[o[0].replace(n,decodeURIComponent)]=r.replace(n,decodeURIComponent)}catch(t){}}return e}function r(){return o(document.cookie)}function s(t,e,n){document.cookie=c(t,e,i({path:"/"},n))}e.__esModule=!0,e.encode=c,e.parse=o,e.getAll=r,e.get=function(t){return r()[t]},e.set=s,e.remove=function(t,e){s(t,"",i(i({},e),{expires:-1}))}}));y(Io),Io.encode,Io.parse,Io.getAll;var go=Io.get,bo=Io.set,yo=Io.remove,Bo={get:function(t){var e=go(t);if(void 0!==e)return JSON.parse(e)},save:function(t,e,i){var n={};"https:"===window.location.protocol&&(n={secure:!0,sameSite:"none"}),n.expires=i.daysUntilExpire,bo(t,JSON.stringify(e),n)},remove:function(t){yo(t)}},Co={get:function(t){return Bo.get(t)||Bo.get("_legacy_"+t)},save:function(t,e,i){var n={};"https:"===window.location.protocol&&(n={secure:!0}),n.expires=i.daysUntilExpire,bo("_legacy_"+t,JSON.stringify(e),n),Bo.save(t,e,i)},remove:function(t){Bo.remove(t),Bo.remove("_legacy_"+t)}},po={get:function(t){if("undefined"!=typeof sessionStorage){var e=sessionStorage.getItem(t);if(void 0!==e)return JSON.parse(e)}},save:function(t,e){sessionStorage.setItem(t,JSON.stringify(e))},remove:function(t){sessionStorage.removeItem(t)}};var mo,ho=("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Ci8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICAgQ29weXJpZ2h0IChjKSBNaWNyb3NvZnQgQ29ycG9yYXRpb24uIEFsbCByaWdodHMgcmVzZXJ2ZWQuCiAgICBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsgeW91IG1heSBub3QgdXNlCiAgICB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4gWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZQogICAgTGljZW5zZSBhdCBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjAKCiAgICBUSElTIENPREUgSVMgUFJPVklERUQgT04gQU4gKkFTIElTKiBCQVNJUywgV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZCiAgICBLSU5ELCBFSVRIRVIgRVhQUkVTUyBPUiBJTVBMSUVELCBJTkNMVURJTkcgV0lUSE9VVCBMSU1JVEFUSU9OIEFOWSBJTVBMSUVECiAgICBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgVElUTEUsIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLAogICAgTUVSQ0hBTlRBQkxJVFkgT1IgTk9OLUlORlJJTkdFTUVOVC4KCiAgICBTZWUgdGhlIEFwYWNoZSBWZXJzaW9uIDIuMCBMaWNlbnNlIGZvciBzcGVjaWZpYyBsYW5ndWFnZSBnb3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AgIH1cclxuICAgICAgICByZXR1cm4gdDtcclxuICAgIH1cclxuICAgIHJldHVybiBfX2Fzc2lnbi5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gX19yZXN0KHMsIGUpIHtcclxuICAgIHZhciB0ID0ge307XHJcbiAgICBmb3IgKHZhciBwIGluIHMpIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocywgcCkgJiYgZS5pbmRleE9mKHApIDwgMClcclxuICAgICAgICB0W3BdID0gc1twXTtcclxuICAgIGlmIChzICE9IG51bGwgJiYgdHlwZW9mIE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMgPT09IFwiZnVuY3Rpb25cIilcclxuICAgICAgICBmb3IgKHZhciBpID0gMCwgcCA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMocyk7IGkgPCBwLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChlLmluZGV4T2YocFtpXSkgPCAwICYmIE9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChzLCBwW2ldKSlcclxuICAgICAgICAgICAgICAgIHRbcFtpXV0gPSBzW3BbaV1dO1xyXG4gICAgICAgIH1cclxuICAgIHJldHVybiB0O1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gX19kZWNvcmF0ZShkZWNvcmF0b3JzLCB0YXJnZXQsIGtleSwgZGVzYykge1xyXG4gICAgdmFyIGMgPSBhcmd1bWVudHMubGVuZ3RoLCByID0gYyA8IDMgPyB0YXJnZXQgOiBkZXNjID09PSBudWxsID8gZGVzYyA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IodGFyZ2V0LCBrZXkpIDogZGVzYywgZDtcclxuICAgIGlmICh0eXBlb2YgUmVmbGVjdCA9PT0gXCJvYmplY3RcIiAmJiB0eXBlb2YgUmVmbGV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0aW9uIHZlcmIobikgeyByZXR1cm4gZnVuY3Rpb24gKHYpIHsgcmV0dXJuIHN0ZXAoW24sIHZdKTsgfTsgfVxyXG4gICAgZnVuY3Rpb24gc3RlcChvcCkge1xyXG4gICAgICAgIGlmIChmKSB0aHJvdyBuZXcgVHlwZUVycm9yKFwiR2VuZXJhdG9yIGlzIGFscmVhZHkgZXhlY3V0aW5nLlwiKTtcclxuICAgICAgICB3aGlsZSAoXykgdHJ5IHtcclxuICAgICAgICAgICAgaWYgKGYgPSAxLCB5ICYmICh0ID0gb3BbMF0gJiAyID8geVtcInJldHVyblwiXSA6IG9wWzBdID8geVtcInRocm93XCJdIHx8ICgodCA9IHlbXCJyZXR1cm5cIl0pICYmIHQuY2FsbCh5KSwgMCkgOiB5Lm5leHQpICYmICEodCA9IHQuY2FsbCh5LCBvcFsxXSkpLmRvbmUpIHJldHVybiB0O1xyXG4gICAgICAgICAgICBpZiAoeSA9IDAsIHQpIG9wID0gW29wWzBdICYgMiwgdC52YWx1ZV07XHJcbiAgICAgICAgICAgIHN3aXRjaCAob3BbMF0pIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgMDogY2FzZSAxOiB0ID0gb3A7IGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiBfLmxhYmVsKys7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB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dHlwZW9mIFN5bWJvbCA9PT0gXCJmdW5jdGlvblwiICYmIG9bU3ltYm9sLml0ZXJhdG9yXSwgaSA9IDA7XHJcbiAgICBpZiAobSkgcmV0dXJuIG0uY2FsbChvKTtcclxuICAgIHJldHVybiB7XHJcbiAgICAgICAgbmV4dDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBpZiAobyAmJiBpID49IG8ubGVuZ3RoKSBvID0gdm9pZCAwO1xyXG4gICAgICAgICAgICByZXR1cm4geyB2YWx1ZTogbyAmJiBvW2krK10sIGRvbmU6ICFvIH07XHJcbiAgICAgICAgfVxyXG4gICAgfTtcclxufVxyXG5cclxuZXhwb3J0IGZ1bmN0aW9uIF9fcmVhZChvLCBuKSB7XHJcbiAgICB2YXIgbSA9IHR5cGVvZiBTeW1ib2wgPT09IFwiZnVuY3Rpb25cIiAmJiBvW1N5bWJvbC5pdGVyYXRvcl07XHJcbiAgICBpZiAoIW0pIHJldHVybiBvO1xyXG4gICAgdmFyIGkgPSBtLmNhbGwobyksIHIsIGFyID0gW10sIGU7XHJcbiAgICB0cnkge1xyXG4gICAgICAgIHdoaWxlICgobiA9PT0gdm9pZCAwIHx8IG4tLSA+IDApICYmICEociA9IGkubmV4dCgpKS5kb25lKSBhci5wdXNoKHIudmFsdWUpO1xyXG4gICAgfVxyXG4gICAgY2F0Y2ggKGVycm9yKSB7IGUgPSB7IGVycm9yOiBlcnJvciB9OyB9XHJcbiAgICBmaW5hbGx5IHtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBpZiAociAmJiAhci5kb25lICYmIChtID0gaVtcInJldHVyblwiXSkpIG0uY2FsbChpKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZmluYWxseSB7IGlmIChlKSB0aHJvdyBlLmVycm9yOyB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gYXI7XHJcbn1cclxuXHJcbmV4cG9ydCBmdW5jdGlvbiBfX3NwcmVhZCgpIHtcclxuICAgIGZvciAodmFy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uint8Array(i.length),c=0,o=i.length;c<o;++c)n[c]=i.charCodeAt(c);return String.fromCharCode.apply(null,new Uint16Array(n.buffer))}return i}(t,void 0!==i&&i),o=c.indexOf("\n",10)+1,r=c.substring(o)+(n?"//# sourceMappingURL="+n:""),s=new Blob([r],{type:"application/javascript"});return URL.createObjectURL(s)}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Ci8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICAgQ29weXJpZ2h0IChjKSBNaWNyb3NvZnQgQ29ycG9yYXRpb24uIEFsbCByaWdodHMgcmVzZXJ2ZWQuCiAgICBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsgeW91IG1heSBub3QgdXNlCiAgICB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4gWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZQogICAgTGljZW5zZSBhdCBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjAKCiAgICBUSElTIENPREUgSVMgUFJPVklERUQgT04gQU4gKkFTIElTKiBCQVNJUywgV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZCiAgICBLSU5ELCBFSVRIRVIgRVhQUkVTUyBPUiBJTVBMSUVELCBJTkNMVURJTkcgV0lUSE9VVCBMSU1JVEFUSU9OIEFOWSBJTVBMSUVECiAgICBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgVElUTEUsIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLAogICAgTUVSQ0hBTlRBQkxJVFkgT1IgTk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ICAgICBmb3IgKHZhciBwIGluIHMpIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocywgcCkpIHRbcF0gPSBzW3BdO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gdDtcclxuICAgIH1cclxuICAgIHJldHVybiBfX2Fzc2lnbi5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gX19yZXN0KHMsIGUpIHtcclxuICAgIHZhciB0ID0ge307XHJcbiAgICBmb3IgKHZhciBwIGluIHMpIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocywgcCkgJiYgZS5pbmRleE9mKHApIDwgMClcclxuICAgICAgICB0W3BdID0gc1twXTtcclxuICAgIGlmIChzICE9IG51bGwgJiYgdHlwZW9mIE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMgPT09IFwiZnVuY3Rpb25cIilcclxuICAgICAgICBmb3IgKHZhciBpID0gMCwgcCA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMocyk7IGkgPCBwLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChlLmluZGV4T2YocFtpXSkgPCAwICYmIE9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChzLCBwW2ldKSlcclxuICAgICAgICAgICAgICAgIHRbcFtpXV0gPSBzW3BbaV1dO1xyXG4gICAgICAgIH1cclxuICAgIHJldHVybiB0O1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gX19kZWNvcmF0ZShkZWNvcmF0b3JzLCB0YXJnZXQsIGtleSwgZGVzYykge1xyXG4gICAgdmFyIGMgPSBhcmd1bWVudHMubGVuZ3RoLCByID0gYyA8IDMgPyB0YXJnZXQgOiBkZXNjID09PSBudWxsID8gZGVzYyA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB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AgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB8fCBvcFswXSA9PT0gMikpIHsgXyA9IDA7IGNvbnRpbnVlOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSAzICYmICghdCB8fCAob3BbMV0gPiB0WzBdICYmIG9wWzFdIDwgdFszXSkpKSB7IF8ubGFiZWwgPSBvcFsxXTsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDYgJiYgXy5sYWJlbCA8IHRbMV0pIHsgXy5sYWJlbCA9IHRbMV07IHQgPSBvcDsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAodCAmJiBfLmxhYmVsIDwgdFsyXSkgeyBfLmxhYmVsID0gdFsyXTsgXy5vcHMucHVzaChvcCk7IGJyZWFrOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRbMl0pIF8ub3BzLnBvcCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIF8udHJ5cy5wb3AoKTsgY29udGludWU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgb3AgPSBib2R5LmNhbGwodGhpc0FyZywgXyk7XHJcbiAgICAgICAgfSBjYXRjaCAoZSkgeyBvcCA9IFs2LCBlXTsgeSA9IDA7IH0gZmluYWxseSB7IGYgPSB0ID0gMDsgfVxyXG4gICAgICAgIGlmIChvcFswXSAmIDUpIHRocm93IG9wWzFdOyByZXR1cm4geyB2YWx1ZTogb3BbMF0gPyBvcFsxXSA6IHZvaWQgMCwgZG9uZTogdHJ1ZSB9O1xyXG4gICAgfVxyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gX19leHBvcnRTdGFyKG0sIGV4cG9ydHMpIHtcclxuICAgIGZvciAodmFyIHAgaW4gbSkgaWYgKCFleHBvcnRzLmhhc093blByb3BlcnR5KHApKSBleHBvcnRzW3BdID0gbVtwXTtcclxufVxyXG5cclxuZXhwb3J0IGZ1bmN0aW9uIF9fdmFsdWVzKG8pIHtcclxuICAgIHZhciBtID0gdHlwZW9mIFN5bWJvbCA9PT0gXCJmdW5jdGlvblwiICYmIG9bU3ltYm9sLml0ZXJhdG9yXSwgaSA9IDA7XHJcbiAgICBpZiAobSkgcmV0dXJuIG0uY2FsbChvKTtcclxuICAgIHJldHVybiB7XHJcbiAgICAgICAgbmV4dDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBpZiAobyAmJiBpID49IG8ubGVuZ3RoKSBvID0gdm9pZCAwO1xyXG4gICAgICAgICAgICByZXR1cm4geyB2YWx1ZTogbyAmJiBvW2krK10sIGRvbmU6ICFvIH07XHJcbiAgICAgICAgfVxyXG4gICAgfTtcclxufVxyXG5cclxuZXhwb3J0IGZ1bmN0aW9uIF9fcmVhZChvLCBuKSB7XHJcbiAgICB2YXIgbSA9IHR5cGVvZiBTeW1ib2wgPT09IFwiZnVuY3Rpb25cIiAmJiBvW1N5bWJvbC5pdGVyYXRvcl07XHJcbiAgICBpZiAoIW0pIHJldHVybiBvO1xyXG4gICAgdmFyIGkgPSBtLmNhbGwobyksIHIsIGFyID0gW10sIGU7XHJcbiAgICB0cnkge1xyXG4gICAgICAgIHdoaWxlICgobiA9PT0gdm9pZCAwIHx8IG4tLSA+IDApICYmICEociA9IGkubmV4dCgpKS5kb25lKSBhci5wdXNoKHIudmFsdWUpO1xyXG4gICAgfVxyXG4gICAgY2F0Y2ggKGVycm9yKSB7IGUgPSB7IGVycm9yOiBlcnJvciB9OyB9XHJcbiAgICBmaW5hbGx5IHtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBpZiAociAmJiAhci5kb25lICYmIChtID0gaVtcInJldHVyblwiXSkpIG0uY2FsbChpKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZmluYWxseSB7IGlmIChlKSB0aHJvdyBlLmVycm9yOy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BQVVwQyxNQUFNRyxFQUFTK0IsR0FBYyxLQUFLckIifQ==",false),new Worker(mo,t)}),fo={},Fo=new Qc,Zo={memory:function(){return(new so).enclosedCache},localstorage:function(){return new ro}},Vo=function(t){return Zo[t]},Uo=function(){function t(t){var e,i;if(this.options=t,"undefined"!=typeof window&&function(){if(!kc())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===Nc())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 ")}(),this.cacheLocation=t.cacheLocation||"memory",this.cookieStorage=!1===t.legacySameSiteCookie?Bo:Co,this.sessionCheckExpiryDays=t.sessionCheckExpiryDays||1,!Vo(this.cacheLocation))throw new Error('Invalid cache location "'+this.cacheLocation+'"');var n,c,o=t.useCookiesForTransactions?this.cookieStorage:po;this.cache=Vo(this.cacheLocation)(),this.scope=this.options.scope,this.transactionManager=new lo(o),this.domainUrl="https://"+this.options.domain,this.tokenIssuer=(n=this.options.issuer,c=this.domainUrl,n?n.startsWith("https://")?n:"https://"+n+"/":c+"/"),this.defaultScope=eo("openid",void 0!==(null===(i=null===(e=this.options)||void 0===e?void 0:e.advancedOptions)||void 0===i?void 0:i.defaultScope)?this.options.advancedOptions.defaultScope:"openid profile email"),this.options.useRefreshTokens&&(this.scope=eo(this.scope,"offline_access")),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&"memory"===this.cacheLocation&&!/Trident.*rv:11\.0/.test(navigator.userAgent)&&(this.worker=new ho),this.customOptions=function(t){return t.advancedOptions,t.audience,t.auth0Client,t.authorizeTimeoutInSeconds,t.cacheLocation,t.client_id,t.domain,t.issuer,t.leeway,t.max_age,t.redirect_uri,t.scope,t.useRefreshTokens,I(t,["advancedOptions","audience","auth0Client","authorizeTimeoutInSeconds","cacheLocation","client_id","domain","issuer","leeway","max_age","redirect_uri","scope","useRefreshTokens"])}(t)}return t.prototype._url=function(t){var e=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||Ac)));return""+this.domainUrl+t+"&auth0Client="+e},t.prototype._getParams=function(t,e,i,n,c){var o=this.options,r=(o.domain,o.leeway,o.useRefreshTokens,o.useCookiesForTransactions,o.auth0Client,o.cacheLocation,o.advancedOptions,I(o,["domain","leeway","useRefreshTokens","useCookiesForTransactions","auth0Client","cacheLocation","advancedOptions"]));return a(a(a({},r),t),{scope:eo(this.defaultScope,this.scope,t.scope),response_type:"code",response_mode:"query",state:e,nonce:i,redirect_uri:c||this.options.redirect_uri,code_challenge:n,code_challenge_method:"S256"})},t.prototype._authorizeUrl=function(t){return this._url("/authorize?"+Kc(t))},t.prototype._verifyIdToken=function(t,e,i){return function(t){if(!t.id_token)throw new Error("ID token is required but missing");var e=function(t){var e=t.split("."),i=e[0],n=e[1],c=e[2];if(3!==e.length||!i||!n||!c)throw new Error("ID token could not be decoded");var o=JSON.parse(Dc(n)),r={__raw:t},s={};return Object.keys(o).forEach((function(t){r[t]=o[t],ao.includes(t)||(s[t]=o[t])})),{encoded:{header:i,payload:n,signature:c},header:JSON.parse(Dc(i)),claims:r,user:s}}(t.id_token);if(!e.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(e.claims.iss!==t.iss)throw new Error('Issuer (iss) claim mismatch in the ID token; expected "'+t.iss+'", found "'+e.claims.iss+'"');if(!e.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if("RS256"!==e.header.alg)throw new Error('Signature algorithm of "'+e.header.alg+'" is not supported. Expected the ID token to be signed with "RS256".');if(!e.claims.aud||"string"!=typeof e.claims.aud&&!Array.isArray(e.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(e.claims.aud)){if(!e.claims.aud.includes(t.aud))throw new Error('Audience (aud) claim mismatch in the ID token; expected "'+t.aud+'" but was not one of "'+e.claims.aud.join(", ")+'"');if(e.claims.aud.length>1){if(!e.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(e.claims.azp!==t.aud)throw new Error('Authorized Party (azp) claim mismatch in the ID token; expected "'+t.aud+'", found "'+e.claims.azp+'"')}}else if(e.claims.aud!==t.aud)throw new Error('Audience (aud) claim mismatch in the ID token; expected "'+t.aud+'" but found "'+e.claims.aud+'"');if(t.nonce){if(!e.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(e.claims.nonce!==t.nonce)throw new Error('Nonce (nonce) claim mismatch in the ID token; expected "'+t.nonce+'", found "'+e.claims.nonce+'"')}if(t.max_age&&!uo(e.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(!uo(e.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!uo(e.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");var i=t.leeway||60,n=new Date(Date.now()),c=new Date(0),o=new Date(0),r=new Date(0);if(r.setUTCSeconds(parseInt(e.claims.auth_time)+t.max_age+i),c.setUTCSeconds(e.claims.exp+i),o.setUTCSeconds(e.claims.nbf-i),n>c)throw new Error("Expiration Time (exp) claim error in the ID token; current time ("+n+") is after expiration time ("+c+")");if(uo(e.claims.nbf)&&n<o)throw new Error("Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Currrent time ("+n+") is before "+o);if(uo(e.claims.auth_time)&&n>r)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 ("+n+") is after last auth at "+r);if(t.organizationId){if(!e.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(t.organizationId!==e.claims.org_id)throw new Error('Organization ID (org_id) claim mismatch in the ID token; expected "'+t.organizationId+'", found "'+e.claims.org_id+'"')}return e}({iss:this.tokenIssuer,aud:this.options.client_id,id_token:t,nonce:e,organizationId:i,leeway:this.options.leeway,max_age:this._parseNumber(this.options.max_age)})},t.prototype._parseNumber=function(t){return"string"!=typeof t?t:parseInt(t,10)||void 0},t.prototype.buildAuthorizeUrl=function(t){return void 0===t&&(t={}),g(this,void 0,void 0,(function(){var e,i,n,c,o,r,s,l,u,g,b,y;return d(this,(function(d){switch(d.label){case 0:return e=t.redirect_uri,i=t.appState,n=I(t,["redirect_uri","appState"]),c=Tc(Ec()),o=Tc(Ec()),r=Ec(),[4,zc(r)];case 1:return s=d.sent(),l=Oc(s),u=t.fragment?"#"+t.fragment:"",g=this._getParams(n,c,o,l,e),b=this._authorizeUrl(g),y=t.organization||this.options.organization,this.transactionManager.create(a({nonce:o,code_verifier:r,appState:i,scope:g.scope,audience:g.audience||"default",redirect_uri:g.redirect_uri},y&&{organizationId:y})),[2,b+u]}}))}))},t.prototype.loginWithPopup=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),g(this,void 0,void 0,(function(){var i,n,c,o,r,s,l,u,g,b,y,B,C;return d(this,(function(d){switch(d.label){case 0:return i=I(t,[]),n=Tc(Ec()),c=Tc(Ec()),o=Ec(),[4,zc(o)];case 1:return r=d.sent(),s=Oc(r),l=this._getParams(i,n,c,s,this.options.redirect_uri||window.location.origin),u=this._authorizeUrl(a(a({},l),{response_mode:"web_message"})),[4,Yc(u,a(a({},e),{timeoutInSeconds:e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}))];case 2:if(g=d.sent(),n!==g.state)throw new Error("Invalid state");return[4,$c({audience:l.audience,scope:l.scope,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:o,code:g.code,grant_type:"authorization_code",redirect_uri:l.redirect_uri,auth0Client:this.options.auth0Client},this.worker)];case 3:return b=d.sent(),y=t.organization||this.options.organization,B=this._verifyIdToken(b.id_token,c,y),C=a(a({},b),{decodedToken:B,scope:l.scope,audience:l.audience||"default",client_id:this.options.client_id}),this.cache.save(C),this.cookieStorage.save("auth0.is.authenticated",!0,{daysUntilExpire:this.sessionCheckExpiryDays}),[2]}}))}))},t.prototype.getUser=function(t){return void 0===t&&(t={}),g(this,void 0,void 0,(function(){var e,i,n;return d(this,(function(c){return e=t.audience||this.options.audience||"default",i=eo(this.defaultScope,this.scope,t.scope),[2,(n=this.cache.get(new io({client_id:this.options.client_id,audience:e,scope:i})))&&n.decodedToken&&n.decodedToken.user]}))}))},t.prototype.getIdTokenClaims=function(t){return void 0===t&&(t={}),g(this,void 0,void 0,(function(){var e,i,n;return d(this,(function(c){return e=t.audience||this.options.audience||"default",i=eo(this.defaultScope,this.scope,t.scope),[2,(n=this.cache.get(new io({client_id:this.options.client_id,audience:e,scope:i})))&&n.decodedToken&&n.decodedToken.claims]}))}))},t.prototype.loginWithRedirect=function(t){return void 0===t&&(t={}),g(this,void 0,void 0,(function(){var e,i,n;return d(this,(function(c){switch(c.label){case 0:return e=t.redirectMethod,i=I(t,["redirectMethod"]),[4,this.buildAuthorizeUrl(i)];case 1:return n=c.sent(),window.location[e||"assign"](n),[2]}}))}))},t.prototype.handleRedirectCallback=function(t){return void 0===t&&(t=window.location.href),g(this,void 0,void 0,(function(){var e,i,n,c,o,r,s,l,u,I,g;return d(this,(function(d){switch(d.label){case 0:if(0===(e=t.split("?").slice(1)).length)throw new Error("There are no query params available for parsing.");if(i=function(t){t.indexOf("#")>-1&&(t=t.substr(0,t.indexOf("#")));var e=t.split("&"),i={};return e.forEach((function(t){var e=t.split("="),n=e[0],c=e[1];i[n]=decodeURIComponent(c)})),a(a({},i),{expires_in:parseInt(i.expires_in)})}(e.join("")),n=i.state,c=i.code,o=i.error,r=i.error_description,!(s=this.transactionManager.get())||!s.code_verifier)throw new Error("Invalid state");if(this.transactionManager.remove(),o)throw new Wc(o,r,n,s.appState);return l={audience:s.audience,scope:s.scope,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:s.code_verifier,grant_type:"authorization_code",code:c,auth0Client:this.options.auth0Client},void 0!==s.redirect_uri&&(l.redirect_uri=s.redirect_uri),[4,$c(l,this.worker)];case 1:return u=d.sent(),I=this._verifyIdToken(u.id_token,s.nonce,s.organizationId),g=a(a({},u),{decodedToken:I,audience:s.audience,scope:s.scope,client_id:this.options.client_id}),this.cache.save(g),this.cookieStorage.save("auth0.is.authenticated",!0,{daysUntilExpire:this.sessionCheckExpiryDays}),[2,{appState:s.appState}]}}))}))},t.prototype.checkSession=function(t){return g(this,void 0,void 0,(function(){var e;return d(this,(function(i){switch(i.label){case 0:if(!this.cookieStorage.get("auth0.is.authenticated"))return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.getTokenSilently(t)];case 2:return i.sent(),[3,4];case 3:if(e=i.sent(),!Rc.includes(e.error))throw e;return[3,4];case 4:return[2]}}))}))},t.prototype.getTokenSilently=function(t){return void 0===t&&(t={}),g(this,void 0,void 0,(function(){var e,i,n,c=this;return d(this,(function(o){return e=a(a({audience:this.options.audience,ignoreCache:!1},t),{scope:eo(this.defaultScope,this.scope,t.scope)}),i=e.ignoreCache,n=I(e,["ignoreCache"]),[2,(r=function(){return c._getTokenSilently(a({ignoreCache:i},n))},s=this.options.client_id+"::"+n.audience+"::"+n.scope,l=fo[s],l||(l=r().finally((function(){delete fo[s],l=null})),fo[s]=l),l)];var r,s,l}))}))},t.prototype._getTokenSilently=function(t){return void 0===t&&(t={}),g(this,void 0,void 0,(function(){var e,i,n,c,o,r,s=this;return d(this,(function(l){switch(l.label){case 0:return e=t.ignoreCache,i=I(t,["ignoreCache"]),n=function(){var t=s.cache.get(new io({scope:i.scope,audience:i.audience||"default",client_id:s.options.client_id}),60);return t&&t.access_token},!e&&(c=n())?[2,c]:[4,(u=function(){return Fo.acquireLock("auth0.lock.getTokenSilently",5e3)},b=10,void 0===b&&(b=3),g(void 0,void 0,void 0,(function(){var t;return d(this,(function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<b?[4,u()]:[3,4];case 2:if(e.sent())return[2,!0];e.label=3;case 3:return t++,[3,1];case 4:return[2,!1]}}))})))];case 1:if(!l.sent())return[3,10];l.label=2;case 2:return l.trys.push([2,,7,9]),!e&&(c=n())?[2,c]:this.options.useRefreshTokens?[4,this._getTokenUsingRefreshToken(i)]:[3,4];case 3:return r=l.sent(),[3,6];case 4:return[4,this._getTokenFromIFrame(i)];case 5:r=l.sent(),l.label=6;case 6:return o=r,this.cache.save(a({client_id:this.options.client_id},o)),this.cookieStorage.save("auth0.is.authenticated",!0,{daysUntilExpire:this.sessionCheckExpiryDays}),[2,o.access_token];case 7:return[4,Fo.releaseLock("auth0.lock.getTokenSilently")];case 8:return l.sent(),[7];case 9:return[3,11];case 10:throw new Hc;case 11:return[2]}var u,b}))}))},t.prototype.getTokenWithPopup=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),g(this,void 0,void 0,(function(){return d(this,(function(i){switch(i.label){case 0:return t.audience=t.audience||this.options.audience,t.scope=eo(this.defaultScope,this.scope,t.scope),e=a(a({},xc),e),[4,this.loginWithPopup(t,e)];case 1:return i.sent(),[2,this.cache.get(new io({scope:t.scope,audience:t.audience||"default",client_id:this.options.client_id})).access_token]}}))}))},t.prototype.isAuthenticated=function(){return g(this,void 0,void 0,(function(){return d(this,(function(t){switch(t.label){case 0:return[4,this.getUser()];case 1:return[2,!!t.sent()]}}))}))},t.prototype.buildLogoutUrl=function(t){void 0===t&&(t={}),null!==t.client_id?t.client_id=t.client_id||this.options.client_id:delete t.client_id;var e=t.federated,i=I(t,["federated"]),n=e?"&federated":"";return this._url("/v2/logout?"+Kc(i))+n},t.prototype.logout=function(t){void 0===t&&(t={});var e=t.localOnly,i=I(t,["localOnly"]);if(e&&i.federated)throw new Error("It is invalid to set both the `federated` and `localOnly` options to `true`");if(this.cache.clear(),this.cookieStorage.remove("auth0.is.authenticated"),!e){var n=this.buildLogoutUrl(i);window.location.assign(n)}},t.prototype._getTokenFromIFrame=function(t){return g(this,void 0,void 0,(function(){var e,i,n,c,o,r,s,l,u,g,b,y,B,C,p;return d(this,(function(d){switch(d.label){case 0:return e=Tc(Ec()),i=Tc(Ec()),n=Ec(),[4,zc(n)];case 1:c=d.sent(),o=Oc(c),r=this._getParams(t,e,i,o,t.redirect_uri||this.options.redirect_uri||window.location.origin),s=this._authorizeUrl(a(a({},r),{prompt:"none",response_mode:"web_message"})),l=t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,d.label=2;case 2:return d.trys.push([2,5,,6]),[4,Lc(s,this.domainUrl,l)];case 3:if(u=d.sent(),e!==u.state)throw new Error("Invalid state");return g=t.scope,b=t.audience,t.redirect_uri,t.ignoreCache,t.timeoutInSeconds,y=I(t,["scope","audience","redirect_uri","ignoreCache","timeoutInSeconds"]),[4,$c(a(a(a({},this.customOptions),y),{scope:g,audience:b,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:n,code:u.code,grant_type:"authorization_code",redirect_uri:r.redirect_uri,auth0Client:this.options.auth0Client}),this.worker)];case 4:return B=d.sent(),C=this._verifyIdToken(B.id_token,i),[2,a(a({},B),{decodedToken:C,scope:r.scope,audience:r.audience||"default"})];case 5:throw"login_required"===(p=d.sent()).error&&this.logout({localOnly:!0}),p;case 6:return[2]}}))}))},t.prototype._getTokenUsingRefreshToken=function(t){return g(this,void 0,void 0,(function(){var e,i,n,c,o,r,s,l,u;return d(this,(function(g){switch(g.label){case 0:return t.scope=eo(this.defaultScope,this.options.scope,t.scope),(e=this.cache.get(new io({scope:t.scope,audience:t.audience||"default",client_id:this.options.client_id})))&&e.refresh_token||this.worker?[3,2]:[4,this._getTokenFromIFrame(t)];case 1:return[2,g.sent()];case 2:i=t.redirect_uri||this.options.redirect_uri||window.location.origin,c=t.scope,o=t.audience,t.ignoreCache,t.timeoutInSeconds,r=I(t,["scope","audience","ignoreCache","timeoutInSeconds"]),s="number"==typeof t.timeoutInSeconds?1e3*t.timeoutInSeconds:null,g.label=3;case 3:return g.trys.push([3,5,,8]),[4,$c(a(a(a(a(a({},this.customOptions),r),{audience:o,scope:c,baseUrl:this.domainUrl,client_id:this.options.client_id,grant_type:"refresh_token",refresh_token:e&&e.refresh_token,redirect_uri:i}),s&&{timeout:s}),{auth0Client:this.options.auth0Client}),this.worker)];case 4:return n=g.sent(),[3,8];case 5:return"The web worker is missing the refresh token"===(l=g.sent()).message||l.message&&l.message.indexOf("invalid refresh token")>-1?[4,this._getTokenFromIFrame(t)]:[3,7];case 6:return[2,g.sent()];case 7:throw l;case 8:return u=this._verifyIdToken(n.id_token),[2,a(a({},n),{decodedToken:u,scope:t.scope,audience:t.audience||"default"})]}}))}))},t}(),Xo={isAuthenticated:!1,isLoading:!0},Go=function(){throw new Error("You forgot to wrap your component in <Auth0Provider>.")},So=c(c({},Xo),{buildAuthorizeUrl:Go,buildLogoutUrl:Go,getAccessTokenSilently:Go,getAccessTokenWithPopup:Go,getIdTokenClaims:Go,loginWithRedirect:Go,loginWithPopup:Go,logout:Go}),vo=e.createContext(So),Qo=function(t){function e(e,i){var n=t.call(this,i||e)||this;return n.error=e,n.error_description=i,n}return function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}(e,t),e}(Error),xo=/[?&]code=[^&]+/,Ro=/[?&]state=[^&]+/,Ao=/[?&]error=[^&]+/,Jo=function(t){return function(e){return"error"in e?new Qo(e.error,e.error_description):e instanceof Error?e:new Error(t)}},Wo=Jo("Login failed"),Ho=Jo("Get access token failed"),wo=function(t,e){var i,n;switch(e.type){case"LOGIN_POPUP_STARTED":return c(c({},t),{isLoading:!0});case"LOGIN_POPUP_COMPLETE":case"INITIALISED":return c(c({},t),{isAuthenticated:!!e.user,user:e.user,isLoading:!1,error:void 0});case"GET_ACCESS_TOKEN_COMPLETE":return(null===(i=t.user)||void 0===i?void 0:i.updated_at)===(null===(n=e.user)||void 0===n?void 0:n.updated_at)?t:c(c({},t),{isAuthenticated:!!e.user,user:e.user});case"LOGOUT":return c(c({},t),{isAuthenticated:!1,user:void 0});case"ERROR":return c(c({},t),{isLoading:!1,error:e.error})}},Lo=function(t){if(t){var e=t.redirectUri,i=o(t,["redirectUri"]);return c(c({},i),{redirect_uri:e})}},Yo=function(t){window.history.replaceState({},document.title,(null==t?void 0:t.returnTo)||window.location.pathname)},ko=function(){return e.useContext(vo)},No=function(){return i.createElement(i.Fragment,null)},Eo=function(){return""+window.location.pathname+window.location.search};t.Auth0Context=vo,t.Auth0Provider=function(t){var n=t.children,l=t.skipRedirectCallback,u=t.onRedirectCallback,a=void 0===u?Yo:u,I=o(t,["children","skipRedirectCallback","onRedirectCallback"]),g=e.useState((function(){return new Uo(function(t){var e=t.clientId,i=t.redirectUri,n=t.maxAge,r=o(t,["clientId","redirectUri","maxAge"]);return c(c({},r),{client_id:e,redirect_uri:i,max_age:n,auth0Client:{name:"auth0-react",version:"1.4.0"}})}(I))}))[0],d=e.useReducer(wo,Xo),b=d[0],y=d[1];e.useEffect((function(){r(void 0,void 0,void 0,(function(){var t,e,i;return s(this,(function(n){switch(n.label){case 0:return n.trys.push([0,6,,7]),void 0===c&&(c=window.location.search),!(xo.test(c)&&Ro.test(c)||Ao.test(c))||l?[3,2]:[4,g.handleRedirectCallback()];case 1:return t=n.sent().appState,a(t),[3,4];case 2:return[4,g.checkSession()];case 3:n.sent(),n.label=4;case 4:return[4,g.getUser()];case 5:return e=n.sent(),y({type:"INITIALISED",user:e}),[3,7];case 6:return i=n.sent(),y({type:"ERROR",error:Wo(i)}),[3,7];case 7:return[2]}var c}))}))}),[g,a,l]);var B=e.useCallback((function(t){return g.buildAuthorizeUrl(Lo(t))}),[g]),C=e.useCallback((function(t){return g.buildLogoutUrl(t)}),[g]),p=e.useCallback((function(t){return g.loginWithRedirect(Lo(t))}),[g]),m=e.useCallback((function(t,e){return r(void 0,void 0,void 0,(function(){var i,n;return s(this,(function(c){switch(c.label){case 0:y({type:"LOGIN_POPUP_STARTED"}),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,g.loginWithPopup(t,e)];case 2:return c.sent(),[3,4];case 3:return i=c.sent(),y({type:"ERROR",error:Wo(i)}),[2];case 4:return[4,g.getUser()];case 5:return n=c.sent(),y({type:"LOGIN_POPUP_COMPLETE",user:n}),[2]}}))}))}),[g]),h=e.useCallback((function(t){void 0===t&&(t={}),g.logout(t),t.localOnly&&y({type:"LOGOUT"})}),[g]),f=e.useCallback((function(t){return r(void 0,void 0,void 0,(function(){var e,i,n,c;return s(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,3,5]),[4,g.getTokenSilently(t)];case 1:return e=o.sent(),[3,5];case 2:throw i=o.sent(),Ho(i);case 3:return n=y,c={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,g.getUser()];case 4:return n.apply(void 0,[(c.user=o.sent(),c)]),[7];case 5:return[2,e]}}))}))}),[g]),F=e.useCallback((function(t,e){return r(void 0,void 0,void 0,(function(){var i,n,c,o;return s(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,3,5]),[4,g.getTokenWithPopup(t,e)];case 1:return i=r.sent(),[3,5];case 2:throw n=r.sent(),Ho(n);case 3:return c=y,o={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,g.getUser()];case 4:return c.apply(void 0,[(o.user=r.sent(),o)]),[7];case 5:return[2,i]}}))}))}),[g]),Z=e.useCallback((function(t){return g.getIdTokenClaims(t)}),[g]);return i.createElement(vo.Provider,{value:c(c({},b),{buildAuthorizeUrl:B,buildLogoutUrl:C,getAccessTokenSilently:f,getAccessTokenWithPopup:F,getIdTokenClaims:Z,loginWithRedirect:p,loginWithPopup:m,logout:h})},n)},t.OAuthError=Qo,t.useAuth0=ko,t.withAuth0=function(t){return function(e){return i.createElement(vo.Consumer,null,(function(n){return i.createElement(t,c({auth0:n},e))}))}},t.withAuthenticationRequired=function(t,n){return void 0===n&&(n={}),function(o){var l=this,u=ko(),a=u.isAuthenticated,I=u.isLoading,g=u.loginWithRedirect,d=n.returnTo,b=void 0===d?Eo:d,y=n.onRedirecting,B=void 0===y?No:y,C=n.loginOptions,p=void 0===C?{}:C;return e.useEffect((function(){if(!I&&!a){var t=c(c({},p),{appState:c(c({},p.appState),{returnTo:"function"==typeof b?b():b})});r(l,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,g(t)];case 1:return e.sent(),[2]}}))}))}}),[I,a,g,p,b]),a?i.createElement(t,c({},o)):B()}},Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
23
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
24
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
25
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
26
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
27
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
28
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
29
|
+
***************************************************************************** */var s=function(e,t){return(s=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)};function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var l=function(){return(l=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}).apply(this,arguments)};function f(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 d(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 h(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=(o=c.trys).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 p(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 y(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||t)}var v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function b(e,t){return e(t={exports:{}},t.exports),t.exports}var g,w,S=function(e){return e&&e.Math==Math&&e},I=S("object"==typeof globalThis&&globalThis)||S("object"==typeof window&&window)||S("object"==typeof self&&self)||S("object"==typeof v&&v)||function(){return this}()||Function("return this")(),k=function(e){try{return!!e()}catch(e){return!0}},T=!k((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),_={}.propertyIsEnumerable,E=Object.getOwnPropertyDescriptor,O={f:E&&!_.call({1:2},1)?function(e){var t=E(this,e);return!!t&&t.enumerable}:_},K=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},C={}.toString,R=function(e){return C.call(e).slice(8,-1)},Z="".split,x=k((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==R(e)?Z.call(e,""):Object(e)}:Object,U=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},W=function(e){return x(U(e))},F=function(e){return"object"==typeof e?null!==e:"function"==typeof e},V=function(e){return"function"==typeof e?e:void 0},L=function(e,t){return arguments.length<2?V(I[e]):I[e]&&I[e][t]},X=L("navigator","userAgent")||"",Y=I.process,A=I.Deno,P=Y&&Y.versions||A&&A.version,N=P&&P.v8;N?w=(g=N.split("."))[0]<4?1:g[0]+g[1]:X&&(!(g=X.match(/Edge\/(\d+)/))||g[1]>=74)&&(g=X.match(/Chrome\/(\d+)/))&&(w=g[1]);var j=w&&+w,G=!!Object.getOwnPropertySymbols&&!k((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&j&&j<41})),J=G&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,B=J?function(e){return"symbol"==typeof e}:function(e){var t=L("Symbol");return"function"==typeof t&&Object(e)instanceof t},z=function(e,t){try{Object.defineProperty(I,e,{value:t,configurable:!0,writable:!0})}catch(n){I[e]=t}return t},H=I["__core-js_shared__"]||z("__core-js_shared__",{}),D=b((function(e){(e.exports=function(e,t){return H[e]||(H[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.16.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),M=function(e){return Object(U(e))},q={}.hasOwnProperty,Q=Object.hasOwn||function(e,t){return q.call(M(e),t)},$=0,ee=Math.random(),te=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++$+ee).toString(36)},ne=D("wks"),re=I.Symbol,oe=J?re:re&&re.withoutSetter||te,ie=function(e){return Q(ne,e)&&(G||"string"==typeof ne[e])||(G&&Q(re,e)?ne[e]=re[e]:ne[e]=oe("Symbol."+e)),ne[e]},ce=ie("toPrimitive"),ae=function(e){var t=function(e,t){if(!F(e)||B(e))return e;var n,r=e[ce];if(void 0!==r){if(void 0===t&&(t="default"),n=r.call(e,t),!F(n)||B(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,r;if("string"===t&&"function"==typeof(n=e.toString)&&!F(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!F(r=n.call(e)))return r;if("string"!==t&&"function"==typeof(n=e.toString)&&!F(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}(e,t)}(e,"string");return B(t)?t:String(t)},se=I.document,ue=F(se)&&F(se.createElement),le=function(e){return ue?se.createElement(e):{}},fe=!T&&!k((function(){return 7!=Object.defineProperty(le("div"),"a",{get:function(){return 7}}).a})),de=Object.getOwnPropertyDescriptor,he={f:T?de:function(e,t){if(e=W(e),t=ae(t),fe)try{return de(e,t)}catch(e){}if(Q(e,t))return K(!O.f.call(e,t),e[t])}},pe=function(e){if(!F(e))throw TypeError(String(e)+" is not an object");return e},ye=Object.defineProperty,ve={f:T?ye:function(e,t,n){if(pe(e),t=ae(t),pe(n),fe)try{return ye(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},me=T?function(e,t,n){return ve.f(e,t,K(1,n))}:function(e,t,n){return e[t]=n,e},be=Function.toString;"function"!=typeof H.inspectSource&&(H.inspectSource=function(e){return be.call(e)});var ge,we,Se,Ie=H.inspectSource,ke=I.WeakMap,Te="function"==typeof ke&&/native code/.test(Ie(ke)),_e=D("keys"),Ee=function(e){return _e[e]||(_e[e]=te(e))},Oe={},Ke=I.WeakMap;if(Te||H.state){var Ce=H.state||(H.state=new Ke),Re=Ce.get,Ze=Ce.has,xe=Ce.set;ge=function(e,t){if(Ze.call(Ce,e))throw new TypeError("Object already initialized");return t.facade=e,xe.call(Ce,e,t),t},we=function(e){return Re.call(Ce,e)||{}},Se=function(e){return Ze.call(Ce,e)}}else{var Ue=Ee("state");Oe[Ue]=!0,ge=function(e,t){if(Q(e,Ue))throw new TypeError("Object already initialized");return t.facade=e,me(e,Ue,t),t},we=function(e){return Q(e,Ue)?e[Ue]:{}},Se=function(e){return Q(e,Ue)}}var We,Fe={set:ge,get:we,has:Se,enforce:function(e){return Se(e)?we(e):ge(e,{})},getterFor:function(e){return function(t){var n;if(!F(t)||(n=we(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Ve=b((function(e){var t=Fe.get,n=Fe.enforce,r=String(String).split("String");(e.exports=function(e,t,o,i){var c,a=!!i&&!!i.unsafe,s=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof t||Q(o,"name")||me(o,"name",t),(c=n(o)).source||(c.source=r.join("string"==typeof t?t:""))),e!==I?(a?!u&&e[t]&&(s=!0):delete e[t],s?e[t]=o:me(e,t,o)):s?e[t]=o:z(t,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||Ie(this)}))})),Le=Math.ceil,Xe=Math.floor,Ye=function(e){return isNaN(e=+e)?0:(e>0?Xe:Le)(e)},Ae=Math.min,Pe=function(e){return e>0?Ae(Ye(e),9007199254740991):0},Ne=Math.max,je=Math.min,Ge=function(e){return function(t,n,r){var o,i=W(t),c=Pe(i.length),a=function(e,t){var n=Ye(e);return n<0?Ne(n+t,0):je(n,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}},Je={includes:Ge(!0),indexOf:Ge(!1)},Be=Je.indexOf,ze=function(e,t){var n,r=W(e),o=0,i=[];for(n in r)!Q(Oe,n)&&Q(r,n)&&i.push(n);for(;t.length>o;)Q(r,n=t[o++])&&(~Be(i,n)||i.push(n));return i},He=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],De=He.concat("length","prototype"),Me={f:Object.getOwnPropertyNames||function(e){return ze(e,De)}},qe={f:Object.getOwnPropertySymbols},Qe=L("Reflect","ownKeys")||function(e){var t=Me.f(pe(e)),n=qe.f;return n?t.concat(n(e)):t},$e=function(e,t){for(var n=Qe(t),r=ve.f,o=he.f,i=0;i<n.length;i++){var c=n[i];Q(e,c)||r(e,c,o(t,c))}},et=/#|\.prototype\./,tt=function(e,t){var n=rt[nt(e)];return n==it||n!=ot&&("function"==typeof t?k(t):!!t)},nt=tt.normalize=function(e){return String(e).replace(et,".").toLowerCase()},rt=tt.data={},ot=tt.NATIVE="N",it=tt.POLYFILL="P",ct=tt,at=he.f,st=function(e,t){var n,r,o,i,c,a=e.target,s=e.global,u=e.stat;if(n=s?I:u?I[a]||z(a,{}):(I[a]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(c=at(n,r))&&c.value:n[r],!ct(s?r:a+(u?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;$e(i,o)}(e.sham||o&&o.sham)&&me(i,"sham",!0),Ve(n,r,i,e)}},ut=function(e){if(B(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)},lt=ie("match"),ft=function(e){if(function(e){var t;return F(e)&&(void 0!==(t=e[lt])?!!t:"RegExp"==R(e))}(e))throw TypeError("The method doesn't accept regular expressions");return e},dt=ie("match"),ht=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[dt]=!1,"/./"[e](t)}catch(e){}}return!1},pt=he.f,yt="".startsWith,vt=Math.min,mt=ht("startsWith"),bt=!(mt||(We=pt(String.prototype,"startsWith"),!We||We.writable));st({target:"String",proto:!0,forced:!bt&&!mt},{startsWith:function(e){var t=ut(U(this));ft(e);var n=Pe(vt(arguments.length>1?arguments[1]:void 0,t.length)),r=ut(e);return yt?yt.call(t,r,n):t.slice(n,n+r.length)===r}});var gt=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},wt=function(e,t,n){if(gt(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}},St=Function.call,It=function(e,t,n){return wt(St,I[e].prototype[t],n)};It("String","startsWith");var kt=Array.isArray||function(e){return"Array"==R(e)},Tt=function(e,t,n){var r=ae(t);r in e?ve.f(e,r,K(0,n)):e[r]=n},_t=ie("species"),Et=function(e,t){return new(function(e){var t;return kt(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!kt(t.prototype)?F(t)&&null===(t=t[_t])&&(t=void 0):t=void 0),void 0===t?Array:t}(e))(0===t?0:t)},Ot=ie("species"),Kt=ie("isConcatSpreadable"),Ct=j>=51||!k((function(){var e=[];return e[Kt]=!1,e.concat()[0]!==e})),Rt=("concat",j>=51||!k((function(){var e=[];return(e.constructor={})[Ot]=function(){return{foo:1}},1!==e.concat(Boolean).foo}))),Zt=function(e){if(!F(e))return!1;var t=e[Kt];return void 0!==t?!!t:kt(e)};st({target:"Array",proto:!0,forced:!Ct||!Rt},{concat:function(e){var t,n,r,o,i,c=M(this),a=Et(c,0),s=0;for(t=-1,r=arguments.length;t<r;t++)if(Zt(i=-1===t?c:arguments[t])){if(s+(o=Pe(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<o;n++,s++)n in i&&Tt(a,s,i[n])}else{if(s>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Tt(a,s++,i)}return a.length=s,a}});var xt={};xt[ie("toStringTag")]="z";var Ut="[object z]"===String(xt),Wt=ie("toStringTag"),Ft="Arguments"==R(function(){return arguments}()),Vt=Ut?R: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=Object(e),Wt))?n:Ft?R(t):"Object"==(r=R(t))&&"function"==typeof t.callee?"Arguments":r},Lt=Ut?{}.toString:function(){return"[object "+Vt(this)+"]"};Ut||Ve(Object.prototype,"toString",Lt,{unsafe:!0});var Xt,Yt=Object.keys||function(e){return ze(e,He)},At=T?Object.defineProperties:function(e,t){pe(e);for(var n,r=Yt(t),o=r.length,i=0;o>i;)ve.f(e,n=r[i++],t[n]);return e},Pt=L("document","documentElement"),Nt=Ee("IE_PROTO"),jt=function(){},Gt=function(e){return"<script>"+e+"<\/script>"},Jt=function(e){e.write(Gt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Bt=function(){try{Xt=new ActiveXObject("htmlfile")}catch(e){}var e,t;Bt="undefined"!=typeof document?document.domain&&Xt?Jt(Xt):((t=le("iframe")).style.display="none",Pt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Gt("document.F=Object")),e.close(),e.F):Jt(Xt);for(var n=He.length;n--;)delete Bt.prototype[He[n]];return Bt()};Oe[Nt]=!0;var zt=Object.create||function(e,t){var n;return null!==e?(jt.prototype=pe(e),n=new jt,jt.prototype=null,n[Nt]=e):n=Bt(),void 0===t?n:At(n,t)},Ht=Me.f,Dt={}.toString,Mt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],qt={f:function(e){return Mt&&"[object Window]"==Dt.call(e)?function(e){try{return Ht(e)}catch(e){return Mt.slice()}}(e):Ht(W(e))}},Qt={f:ie},$t=I,en=ve.f,tn=function(e){var t=$t.Symbol||($t.Symbol={});Q(t,e)||en(t,e,{value:Qt.f(e)})},nn=ve.f,rn=ie("toStringTag"),on=function(e,t,n){e&&!Q(e=n?e:e.prototype,rn)&&nn(e,rn,{configurable:!0,value:t})},cn=[].push,an=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=M(s),y=x(p),v=wt(u,l,3),m=Pe(y.length),b=0,g=f||Et,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:cn.call(w,d)}else switch(e){case 4:return!1;case 7:cn.call(w,d)}return i?-1:r||o?o:w}},sn=[an(0),an(1),an(2),an(3),an(4),an(5),an(6),an(7)][0],un=Ee("hidden"),ln=ie("toPrimitive"),fn=Fe.set,dn=Fe.getterFor("Symbol"),hn=Object.prototype,pn=I.Symbol,yn=L("JSON","stringify"),vn=he.f,mn=ve.f,bn=qt.f,gn=O.f,wn=D("symbols"),Sn=D("op-symbols"),In=D("string-to-symbol-registry"),kn=D("symbol-to-string-registry"),Tn=D("wks"),_n=I.QObject,En=!_n||!_n.prototype||!_n.prototype.findChild,On=T&&k((function(){return 7!=zt(mn({},"a",{get:function(){return mn(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=vn(hn,t);r&&delete hn[t],mn(e,t,n),r&&e!==hn&&mn(hn,t,r)}:mn,Kn=function(e,t){var n=wn[e]=zt(pn.prototype);return fn(n,{type:"Symbol",tag:e,description:t}),T||(n.description=t),n},Cn=function(e,t,n){e===hn&&Cn(Sn,t,n),pe(e);var r=ae(t);return pe(n),Q(wn,r)?(n.enumerable?(Q(e,un)&&e[un][r]&&(e[un][r]=!1),n=zt(n,{enumerable:K(0,!1)})):(Q(e,un)||mn(e,un,K(1,{})),e[un][r]=!0),On(e,r,n)):mn(e,r,n)},Rn=function(e,t){pe(e);var n=W(t),r=Yt(n).concat(Wn(n));return sn(r,(function(t){T&&!Zn.call(n,t)||Cn(e,t,n[t])})),e},Zn=function(e){var t=ae(e),n=gn.call(this,t);return!(this===hn&&Q(wn,t)&&!Q(Sn,t))&&(!(n||!Q(this,t)||!Q(wn,t)||Q(this,un)&&this[un][t])||n)},xn=function(e,t){var n=W(e),r=ae(t);if(n!==hn||!Q(wn,r)||Q(Sn,r)){var o=vn(n,r);return!o||!Q(wn,r)||Q(n,un)&&n[un][r]||(o.enumerable=!0),o}},Un=function(e){var t=bn(W(e)),n=[];return sn(t,(function(e){Q(wn,e)||Q(Oe,e)||n.push(e)})),n},Wn=function(e){var t=e===hn,n=bn(t?Sn:W(e)),r=[];return sn(n,(function(e){!Q(wn,e)||t&&!Q(hn,e)||r.push(wn[e])})),r};if(G||(Ve((pn=function(){if(this instanceof pn)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?ut(arguments[0]):void 0,t=te(e),n=function(e){this===hn&&n.call(Sn,e),Q(this,un)&&Q(this[un],t)&&(this[un][t]=!1),On(this,t,K(1,e))};return T&&En&&On(hn,t,{configurable:!0,set:n}),Kn(t,e)}).prototype,"toString",(function(){return dn(this).tag})),Ve(pn,"withoutSetter",(function(e){return Kn(te(e),e)})),O.f=Zn,ve.f=Cn,he.f=xn,Me.f=qt.f=Un,qe.f=Wn,Qt.f=function(e){return Kn(ie(e),e)},T&&(mn(pn.prototype,"description",{configurable:!0,get:function(){return dn(this).description}}),Ve(hn,"propertyIsEnumerable",Zn,{unsafe:!0}))),st({global:!0,wrap:!0,forced:!G,sham:!G},{Symbol:pn}),sn(Yt(Tn),(function(e){tn(e)})),st({target:"Symbol",stat:!0,forced:!G},{for:function(e){var t=ut(e);if(Q(In,t))return In[t];var n=pn(t);return In[t]=n,kn[n]=t,n},keyFor:function(e){if(!B(e))throw TypeError(e+" is not a symbol");if(Q(kn,e))return kn[e]},useSetter:function(){En=!0},useSimple:function(){En=!1}}),st({target:"Object",stat:!0,forced:!G,sham:!T},{create:function(e,t){return void 0===t?zt(e):Rn(zt(e),t)},defineProperty:Cn,defineProperties:Rn,getOwnPropertyDescriptor:xn}),st({target:"Object",stat:!0,forced:!G},{getOwnPropertyNames:Un,getOwnPropertySymbols:Wn}),st({target:"Object",stat:!0,forced:k((function(){qe.f(1)}))},{getOwnPropertySymbols:function(e){return qe.f(M(e))}}),yn){var Fn=!G||k((function(){var e=pn();return"[null]"!=yn([e])||"{}"!=yn({a:e})||"{}"!=yn(Object(e))}));st({target:"JSON",stat:!0,forced:Fn},{stringify:function(e,t,n){for(var r,o=[e],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=t,(F(t)||void 0!==e)&&!B(e))return kt(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!B(t))return t}),o[1]=t,yn.apply(null,o)}})}pn.prototype[ln]||me(pn.prototype,ln,pn.prototype.valueOf),on(pn,"Symbol"),Oe[un]=!0,tn("asyncIterator");var Vn=ve.f,Ln=I.Symbol;if(T&&"function"==typeof Ln&&(!("description"in Ln.prototype)||void 0!==Ln().description)){var Xn={},Yn=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof Yn?new Ln(e):void 0===e?Ln():Ln(e);return""===e&&(Xn[t]=!0),t};$e(Yn,Ln);var An=Yn.prototype=Ln.prototype;An.constructor=Yn;var Pn=An.toString,Nn="Symbol(test)"==String(Ln("test")),jn=/^Symbol\((.*)\)[^)]+$/;Vn(An,"description",{configurable:!0,get:function(){var e=F(this)?this.valueOf():this,t=Pn.call(e);if(Q(Xn,e))return"";var n=Nn?t.slice(7,-1):t.replace(jn,"$1");return""===n?void 0:n}}),st({global:!0,forced:!0},{Symbol:Yn})}tn("hasInstance"),tn("isConcatSpreadable"),tn("iterator"),tn("match"),tn("matchAll"),tn("replace"),tn("search"),tn("species"),tn("split"),tn("toPrimitive"),tn("toStringTag"),tn("unscopables"),on(I.JSON,"JSON",!0),on(Math,"Math",!0),st({global:!0},{Reflect:{}}),on(I.Reflect,"Reflect",!0),$t.Symbol;var Gn,Jn,Bn,zn=function(e){return function(t,n){var r,o,i=ut(U(t)),c=Ye(n),a=i.length;return c<0||c>=a?e?"":void 0:(r=i.charCodeAt(c))<55296||r>56319||c+1===a||(o=i.charCodeAt(c+1))<56320||o>57343?e?i.charAt(c):r:e?i.slice(c,c+2):o-56320+(r-55296<<10)+65536}},Hn={codeAt:zn(!1),charAt:zn(!0)},Dn=!k((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Mn=Ee("IE_PROTO"),qn=Object.prototype,Qn=Dn?Object.getPrototypeOf:function(e){return e=M(e),Q(e,Mn)?e[Mn]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?qn:null},$n=ie("iterator"),er=!1;[].keys&&("next"in(Bn=[].keys())?(Jn=Qn(Qn(Bn)))!==Object.prototype&&(Gn=Jn):er=!0),(null==Gn||k((function(){var e={};return Gn[$n].call(e)!==e})))&&(Gn={}),Q(Gn,$n)||me(Gn,$n,(function(){return this}));var tr={IteratorPrototype:Gn,BUGGY_SAFARI_ITERATORS:er},nr={},rr=tr.IteratorPrototype,or=function(){return this},ir=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return pe(n),function(e){if(!F(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),cr=tr.IteratorPrototype,ar=tr.BUGGY_SAFARI_ITERATORS,sr=ie("iterator"),ur=function(){return this},lr=function(e,t,n,r,o,i,c){!function(e,t,n){var r=t+" Iterator";e.prototype=zt(rr,{next:K(1,n)}),on(e,r,!1),nr[r]=or}(n,t,r);var a,s,u,l=function(e){if(e===o&&y)return y;if(!ar&&e in h)return h[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",d=!1,h=e.prototype,p=h[sr]||h["@@iterator"]||o&&h[o],y=!ar&&p||l(o),v="Array"==t&&h.entries||p;if(v&&(a=Qn(v.call(new e)),cr!==Object.prototype&&a.next&&(Qn(a)!==cr&&(ir?ir(a,cr):"function"!=typeof a[sr]&&me(a,sr,ur)),on(a,f,!0))),"values"==o&&p&&"values"!==p.name&&(d=!0,y=function(){return p.call(this)}),h[sr]!==y&&me(h,sr,y),nr[t]=y,o)if(s={values:l("values"),keys:i?y:l("keys"),entries:l("entries")},c)for(u in s)(ar||d||!(u in h))&&Ve(h,u,s[u]);else st({target:t,proto:!0,forced:ar||d},s);return s},fr=Hn.charAt,dr=Fe.set,hr=Fe.getterFor("String Iterator");lr(String,"String",(function(e){dr(this,{type:"String Iterator",string:ut(e),index:0})}),(function(){var e,t=hr(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=fr(n,r),t.index+=e.length,{value:e,done:!1})}));var pr=function(e){var t=e.return;if(void 0!==t)return pe(t.call(e)).value},yr=function(e,t,n,r){try{return r?t(pe(n)[0],n[1]):t(n)}catch(t){throw pr(e),t}},vr=ie("iterator"),mr=Array.prototype,br=function(e){return void 0!==e&&(nr.Array===e||mr[vr]===e)},gr=ie("iterator"),wr=function(e){if(null!=e)return e[gr]||e["@@iterator"]||nr[Vt(e)]},Sr=ie("iterator"),Ir=!1;try{var kr=0,Tr={next:function(){return{done:!!kr++}},return:function(){Ir=!0}};Tr[Sr]=function(){return this},Array.from(Tr,(function(){throw 2}))}catch(s){}var _r=function(e,t){if(!t&&!Ir)return!1;var n=!1;try{var r={};r[Sr]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Er=!_r((function(e){Array.from(e)}));st({target:"Array",stat:!0,forced:Er},{from:function(e){var t,n,r,o,i,c,a=M(e),s="function"==typeof this?this:Array,u=arguments.length,l=u>1?arguments[1]:void 0,f=void 0!==l,d=wr(a),h=0;if(f&&(l=wt(l,u>2?arguments[2]:void 0,2)),null==d||s==Array&&br(d))for(n=new s(t=Pe(a.length));t>h;h++)c=f?l(a[h],h):a[h],Tt(n,h,c);else for(i=(o=d.call(a)).next,n=new s;!(r=i.call(o)).done;h++)c=f?yr(o,l,[r.value,h],!0):r.value,Tt(n,h,c);return n.length=h,n}}),$t.Array.from;var Or,Kr,Cr,Rr="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Zr=ve.f,xr=I.Int8Array,Ur=xr&&xr.prototype,Wr=I.Uint8ClampedArray,Fr=Wr&&Wr.prototype,Vr=xr&&Qn(xr),Lr=Ur&&Qn(Ur),Xr=Object.prototype,Yr=Xr.isPrototypeOf,Ar=ie("toStringTag"),Pr=te("TYPED_ARRAY_TAG"),Nr=te("TYPED_ARRAY_CONSTRUCTOR"),jr=Rr&&!!ir&&"Opera"!==Vt(I.opera),Gr=!1,Jr={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Br={BigInt64Array:8,BigUint64Array:8},zr=function(e){if(!F(e))return!1;var t=Vt(e);return Q(Jr,t)||Q(Br,t)};for(Or in Jr)(Cr=(Kr=I[Or])&&Kr.prototype)?me(Cr,Nr,Kr):jr=!1;for(Or in Br)(Cr=(Kr=I[Or])&&Kr.prototype)&&me(Cr,Nr,Kr);if((!jr||"function"!=typeof Vr||Vr===Function.prototype)&&(Vr=function(){throw TypeError("Incorrect invocation")},jr))for(Or in Jr)I[Or]&&ir(I[Or],Vr);if((!jr||!Lr||Lr===Xr)&&(Lr=Vr.prototype,jr))for(Or in Jr)I[Or]&&ir(I[Or].prototype,Lr);if(jr&&Qn(Fr)!==Lr&&ir(Fr,Lr),T&&!Q(Lr,Ar))for(Or in Gr=!0,Zr(Lr,Ar,{get:function(){return F(this)?this[Pr]:void 0}}),Jr)I[Or]&&me(I[Or],Pr,Or);var Hr={NATIVE_ARRAY_BUFFER_VIEWS:jr,TYPED_ARRAY_CONSTRUCTOR:Nr,TYPED_ARRAY_TAG:Gr&&Pr,aTypedArray:function(e){if(zr(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(ir&&!Yr.call(Vr,e))throw TypeError("Target is not a typed array constructor");return e},exportTypedArrayMethod:function(e,t,n){if(T){if(n)for(var r in Jr){var o=I[r];if(o&&Q(o.prototype,e))try{delete o.prototype[e]}catch(e){}}Lr[e]&&!n||Ve(Lr,e,n?t:jr&&Ur[e]||t)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(T){if(ir){if(n)for(r in Jr)if((o=I[r])&&Q(o,e))try{delete o[e]}catch(e){}if(Vr[e]&&!n)return;try{return Ve(Vr,e,n?t:jr&&Vr[e]||t)}catch(e){}}for(r in Jr)!(o=I[r])||o[e]&&!n||Ve(o,e,t)}},isView:function(e){if(!F(e))return!1;var t=Vt(e);return"DataView"===t||Q(Jr,t)||Q(Br,t)},isTypedArray:zr,TypedArray:Vr,TypedArrayPrototype:Lr},Dr=ie("species"),Mr=Hr.TYPED_ARRAY_CONSTRUCTOR,qr=Hr.aTypedArrayConstructor,Qr=Hr.aTypedArray,$r=[].slice;(0,Hr.exportTypedArrayMethod)("slice",(function(e,t){for(var n=$r.call(Qr(this),e,t),r=function(e){return qr((t=e,n=e[Mr],void 0===(o=pe(t).constructor)||null==(r=pe(o)[Dr])?n:gt(r)));var t,n,r,o}(this),o=0,i=n.length,c=new r(i);i>o;)c[o]=n[o++];return c}),k((function(){new Int8Array(1).slice()})));var eo=ie("unscopables"),to=Array.prototype;null==to[eo]&&ve.f(to,eo,{configurable:!0,value:zt(null)});var no=function(e){to[eo][e]=!0},ro=Je.includes;st({target:"Array",proto:!0},{includes:function(e){return ro(this,e,arguments.length>1?arguments[1]:void 0)}}),no("includes"),It("Array","includes"),st({target:"String",proto:!0,forced:!ht("includes")},{includes:function(e){return!!~ut(U(this)).indexOf(ut(ft(e)),arguments.length>1?arguments[1]:void 0)}}),It("String","includes");var oo=Fe.set,io=Fe.getterFor("Array Iterator");lr(Array,"Array",(function(e,t){oo(this,{type:"Array Iterator",target:W(e),index:0,kind:t})}),(function(){var e=io(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"),nr.Arguments=nr.Array,no("keys"),no("values"),no("entries");var co=!k((function(){return Object.isExtensible(Object.preventExtensions({}))})),ao=b((function(e){var t=ve.f,n=!1,r=te("meta"),o=0,i=Object.isExtensible||function(){return!0},c=function(e){t(e,r,{value:{objectID:"O"+o++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},n=!0;var e=Me.f,t=[].splice,o={};o[r]=1,e(o).length&&(Me.f=function(n){for(var o=e(n),i=0,c=o.length;i<c;i++)if(o[i]===r){t.call(o,i,1);break}return o},st({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:qt.f}))},fastKey:function(e,t){if(!F(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Q(e,r)){if(!i(e))return"F";if(!t)return"E";c(e)}return e[r].objectID},getWeakData:function(e,t){if(!Q(e,r)){if(!i(e))return!0;if(!t)return!1;c(e)}return e[r].weakData},onFreeze:function(e){return co&&n&&i(e)&&!Q(e,r)&&c(e),e}};Oe[r]=!0}));ao.enable,ao.fastKey,ao.getWeakData,ao.onFreeze;var so=function(e,t){this.stopped=e,this.result=t},uo=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=wt(t,l,1+f+h),y=function(e){return r&&pr(r),new so(!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("function"!=typeof(o=wr(e)))throw TypeError("Target is not iterable");if(br(o)){for(i=0,c=Pe(e.length);c>i;i++)if((a=v(e[i]))&&a instanceof so)return a;return new so(!1)}r=o.call(e)}for(s=r.next;!(u=s.call(r)).done;){try{a=v(u.value)}catch(e){throw pr(r),e}if("object"==typeof a&&a&&a instanceof so)return a}return new so(!1)},lo=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e},fo=function(e,t,n){for(var r in t)Ve(e,r,t[r],n);return e},ho=ie("species"),po=ve.f,yo=ao.fastKey,vo=Fe.set,mo=Fe.getterFor;function bo(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 go(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=I.Set,a=c&&c.prototype,s=c,u={},l=function(e){var t=a[e];Ve(a,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(o&&!F(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return o&&!F(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(o&&!F(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(ct(e,"function"!=typeof c||!(o||a.forEach&&!k((function(){(new c).entries().next()})))))s=n.getConstructor(t,e,r,i),ao.enable();else if(ct(e,!0)){var f=new s,d=f[i](o?{}:-0,1)!=f,h=k((function(){f.has(1)})),p=_r((function(e){new c(e)})),y=!o&&k((function(){for(var e=new c,t=5;t--;)e[i](t,t);return!e.has(-0)}));p||((s=t((function(t,n){lo(t,s,e);var o=function(e,t,n){var r,o;return ir&&"function"==typeof(r=t.constructor)&&r!==n&&F(o=r.prototype)&&o!==n.prototype&&ir(e,o),e}(new c,t,s);return null!=n&&uo(n,o[i],{that:o,AS_ENTRIES:r}),o}))).prototype=a,a.constructor=s),(h||y)&&(l("delete"),l("has"),r&&l("get")),(y||d)&&l(i),o&&a.clear&&delete a.clear}u.Set=s,st({global:!0,forced:s!=c},u),on(s,e),o||n.setStrong(s,e,r)}("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),{getConstructor:function(e,t,n,r){var o=e((function(e,i){lo(e,o,t),vo(e,{type:t,index:zt(null),first:void 0,last:void 0,size:0}),T||(e.size=0),null!=i&&uo(i,e[r],{that:e,AS_ENTRIES:n})})),i=mo(t),c=function(e,t,n){var r,o,c=i(e),s=a(e,t);return s?s.value=n:(c.last=s={index:o=yo(t,!0),key:t,value:n,previous:r=c.last,next:void 0,removed:!1},c.first||(c.first=s),r&&(r.next=s),T?c.size++:e.size++,"F"!==o&&(c.index[o]=s)),e},a=function(e,t){var n,r=i(e),o=yo(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return fo(o.prototype,{clear:function(){for(var e=i(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,T?e.size=0:this.size=0},delete:function(e){var t=this,n=i(t),r=a(t,e);if(r){var o=r.next,c=r.previous;delete n.index[r.index],r.removed=!0,c&&(c.next=o),o&&(o.previous=c),n.first==r&&(n.first=o),n.last==r&&(n.last=c),T?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=i(this),r=wt(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!a(this,e)}}),fo(o.prototype,n?{get:function(e){var t=a(this,e);return t&&t.value},set:function(e,t){return c(this,0===e?0:e,t)}}:{add:function(e){return c(this,e=0===e?0:e,e)}}),T&&po(o.prototype,"size",{get:function(){return i(this).size}}),o},setStrong:function(e,t,n){var r=t+" Iterator",o=mo(t),i=mo(r);lr(e,t,(function(e,t){vo(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=L(e),n=ve.f;T&&t&&!t[ho]&&n(t,ho,{configurable:!0,get:function(){return this}})}(t)}}),$t.Set;var wo=setTimeout;function So(e){return Boolean(e&&void 0!==e.length)}function Io(){}function ko(e){if(!(this instanceof ko))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=[],Co(e,this)}function To(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,ko._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 Eo(t.promise,e)}_o(t.promise,r)}else(1===e._state?_o:Eo)(t.promise,e._value)}))):e._deferreds.push(t)}function _o(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 ko)return e._state=3,e._value=t,void Oo(e);if("function"==typeof n)return void Co((r=n,o=t,function(){r.apply(o,arguments)}),e)}e._state=1,e._value=t,Oo(e)}catch(t){Eo(e,t)}var r,o}function Eo(e,t){e._state=2,e._value=t,Oo(e)}function Oo(e){2===e._state&&0===e._deferreds.length&&ko._immediateFn((function(){e._handled||ko._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)To(e,e._deferreds[t]);e._deferreds=null}function Ko(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function Co(e,t){var n=!1;try{e((function(e){n||(n=!0,_o(t,e))}),(function(e){n||(n=!0,Eo(t,e))}))}catch(e){if(n)return;n=!0,Eo(t,e)}}ko.prototype.catch=function(e){return this.then(null,e)},ko.prototype.then=function(e,t){var n=new this.constructor(Io);return To(this,new Ko(e,t,n)),n},ko.prototype.finally=bo,ko.all=function(e){return new ko((function(t,n){if(!So(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])}))},ko.allSettled=go,ko.resolve=function(e){return e&&"object"==typeof e&&e.constructor===ko?e:new ko((function(t){t(e)}))},ko.reject=function(e){return new ko((function(t,n){n(e)}))},ko.race=function(e){return new ko((function(t,n){if(!So(e))return n(new TypeError("Promise.race accepts an array"));for(var r=0,o=e.length;r<o;r++)ko.resolve(e[r]).then(t,n)}))},ko._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){wo(e,0)},ko._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var Ro=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 Ro.Promise?Ro.Promise=ko:Ro.Promise.prototype.finally?Ro.Promise.allSettled||(Ro.Promise.allSettled=go):Ro.Promise.prototype.finally=bo,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 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:v),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&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?i(e):t}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=o(e);if(t){var i=o(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function s(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=o(e)););return e}function u(e,t,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=s(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}var l=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}(),f=function(t){r(s,t);var c=a(s);function s(){var t;return e(this,s),(t=c.call(this)).listeners||l.call(i(t)),Object.defineProperty(i(t),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(i(t),"onabort",{value:null,writable:!0,configurable:!0}),t}return n(s,[{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)),u(o(s.prototype),"dispatchEvent",this).call(this,e)}}]),s}(l),d=function(){function t(){e(this,t),Object.defineProperty(this,"signal",{value:new f,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}();"undefined"!=typeof Symbol&&Symbol.toStringTag&&(d.prototype[Symbol.toStringTag]="AbortController",f.prototype[Symbol.toStringTag]="AbortSignal"),function(e){(function(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})(e)&&(e.AbortController=d,e.AbortSignal=f)}("undefined"!=typeof self?self:v)}();var Zo=b((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()}}));m(Zo);var xo=m(b((function(e,t){var n=v&&v.__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=v&&v.__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=(o=c.trys).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,Zo.default().lock(t)];case 1:return r.sent(),this.acquiredIatSet.has(t)?(n=window.localStorage,null===(o=n.getItem(e))?(Zo.default().unlock(t),[2]):((o=JSON.parse(o)).timeRefreshed=Date.now(),n.setItem(e,JSON.stringify(o)),Zo.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(Zo.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,Zo.default().lock(c.iat)];case 1:r.sent(),this.acquiredIatSet.delete(c.iat),n.removeItem(i),Zo.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}))),Uo={timeoutInSeconds:60},Wo=["login_required","consent_required","interaction_required","account_selection_required","access_denied"],Fo={name:"auth0-spa-js",version:"1.18.0"},Vo=function(e){function t(n,r){var o=e.call(this,r)||this;return o.error=n,o.error_description=r,Object.setPrototypeOf(o,t.prototype),o}return u(t,e),t.fromPayload=function(e){return new t(e.error,e.error_description)},t}(Error),Lo=function(e){function t(n,r,o,i){void 0===i&&(i=null);var c=e.call(this,n,r)||this;return c.state=o,c.appState=i,Object.setPrototypeOf(c,t.prototype),c}return u(t,e),t}(Vo),Xo=function(e){function t(){var n=e.call(this,"timeout","Timeout")||this;return Object.setPrototypeOf(n,t.prototype),n}return u(t,e),t}(Vo),Yo=function(e){function t(n){var r=e.call(this)||this;return r.popup=n,Object.setPrototypeOf(r,t.prototype),r}return u(t,e),t}(Xo),Ao=function(e){function t(n){var r=e.call(this,"cancelled","Popup closed")||this;return r.popup=n,Object.setPrototypeOf(r,t.prototype),r}return u(t,e),t}(Vo),Po=function(e){function t(n,r,o){var i=e.call(this,n,r)||this;return i.mfa_token=o,Object.setPrototypeOf(i,t.prototype),i}return u(t,e),t}(Vo),No=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 Ao(e.popup)))}),1e3),i=setTimeout((function(){clearInterval(o),n(new Yo(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(Vo.fromPayload(c.data.response));t(c.data.response)}},window.addEventListener("message",r)}))},jo=function(){return window.crypto||window.msCrypto},Go=function(){var e=jo();return e.subtle||e.webkitSubtle},Jo=function(){var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.",t="";return Array.from(jo().getRandomValues(new Uint8Array(43))).forEach((function(n){return t+=e[n%e.length]})),t},Bo=function(e){return btoa(e)},zo=function(e){return Object.keys(e).filter((function(t){return void 0!==e[t]})).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")},Ho=function(e){return d(void 0,void 0,void 0,(function(){var t;return h(this,(function(n){switch(n.label){case 0:return t=Go().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()]}}))}))},Do=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,"+"))},Mo=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,y([],p(Array.from(t))))))},qo=function(e,t){return d(void 0,void 0,void 0,(function(){var n,r;return h(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}))}))},Qo=function(e,t,n){return d(void 0,void 0,void 0,(function(){var r,o;return h(this,(function(i){return r=new AbortController,t.signal=r.signal,[2,Promise.race([qo(e,t),new Promise((function(e,t){o=setTimeout((function(){r.abort(),t(new Error("Timeout when executing 'fetch'"))}),n)}))]).finally((function(){clearTimeout(o)}))]}))}))},$o=function(e,t,n,r,o,i,c){return d(void 0,void 0,void 0,(function(){return h(this,(function(a){return[2,(s={auth:{audience:t,scope:n},timeout:o,fetchUrl:e,fetchOptions:r,useFormData:c},u=i,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(s,[n.port2])})))];var s,u}))}))},ei=function(e,t,n,r,o,i,c){return void 0===c&&(c=1e4),d(void 0,void 0,void 0,(function(){return h(this,(function(a){return o?[2,$o(e,t,n,r,c,o,i)]:[2,Qo(e,r,c)]}))}))};function ti(e,t,n,r,o,i,c){return d(this,void 0,void 0,(function(){var a,s,u,l,d,p,y,v,m;return h(this,(function(h){switch(h.label){case 0:a=null,u=0,h.label=1;case 1:if(!(u<3))return[3,6];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,ei(e,n,r,o,i,c,t)];case 3:return s=h.sent(),a=null,[3,6];case 4:return l=h.sent(),a=l,[3,5];case 5:return u++,[3,1];case 6:if(a)throw a.message=a.message||"Failed to fetch",a;if(d=s.json,p=d.error,y=d.error_description,v=f(d,["error","error_description"]),!s.ok){if(m=y||"HTTP error. Unable to fetch "+e,"mfa_required"===p)throw new Po(p,m,v.mfa_token);throw new Vo(p||"request_error",m)}return[2,v]}}))}))}function ni(e,t){var n=e.baseUrl,r=e.timeout,o=e.audience,i=e.scope,c=e.auth0Client,a=e.useFormData,s=f(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);return d(this,void 0,void 0,(function(){var e;return h(this,(function(u){switch(u.label){case 0:return e=a?zo(s):JSON.stringify(s),[4,ti(n+"/oauth/token",r,o||"default",i,{method:"POST",body:e,headers:{"Content-Type":a?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(c||Fo))}},t,a)];case 1:return[2,u.sent()]}}))}))}var ri=function(e){return Array.from(new Set(e))},oi=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ri(e.join(" ").trim().split(/\s+/)).join(" ")},ii=function(){function e(e,t){void 0===t&&(t="@@auth0spajs@@"),this.prefix=t,this.client_id=e.client_id,this.scope=e.scope,this.audience=e.audience}return e.prototype.toKey=function(){return this.prefix+"::"+this.client_id+"::"+this.audience+"::"+this.scope},e.fromKey=function(t){var n=p(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}(),ci=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("@@auth0spajs@@")}))},e}(),ai=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)}})},si=function(){function e(e,t){this.cache=e,this.keyManifest=t}return e.prototype.get=function(e,t){var n;return void 0===t&&(t=0),d(this,void 0,void 0,(function(){var r,o,i,c;return h(this,(function(a){switch(a.label){case 0:return[4,this.cache.get(e.toKey())];case 1:return(r=a.sent())?[3,4]:[4,this.getCacheKeys()];case 2:return(o=a.sent())?(i=this.matchExistingCacheKey(e,o),[4,this.cache.get(i)]):[2];case 3:r=a.sent(),a.label=4;case 4:return r?(c=Math.floor(Date.now()/1e3),r.expiresAt-t<c?r.body.refresh_token?(r.body={refresh_token:r.body.refresh_token},[4,this.cache.set(e.toKey(),r)]):[3,6]:[3,9]):[2];case 5:return a.sent(),[2,r.body];case 6:return[4,this.cache.remove(e.toKey())];case 7:return a.sent(),[4,null===(n=this.keyManifest)||void 0===n?void 0:n.remove(e.toKey())];case 8:return a.sent(),[2];case 9:return[2,r.body]}}))}))},e.prototype.set=function(e){var t;return d(this,void 0,void 0,(function(){var n,r;return h(this,(function(o){switch(o.label){case 0:return n=new ii({client_id:e.client_id,scope:e.scope,audience:e.audience}),r=this.wrapCacheEntry(e),[4,this.cache.set(n.toKey(),r)];case 1:return o.sent(),[4,null===(t=this.keyManifest)||void 0===t?void 0:t.add(n.toKey())];case 2:return o.sent(),[2]}}))}))},e.prototype.clear=function(e){var t;return d(this,void 0,void 0,(function(){var n,r=this;return h(this,(function(o){switch(o.label){case 0:return[4,this.getCacheKeys()];case 1:return(n=o.sent())?[4,n.filter((function(t){return!e||t.includes(e)})).reduce((function(e,t){return d(r,void 0,void 0,(function(){return h(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 o.sent(),[4,null===(t=this.keyManifest)||void 0===t?void 0:t.clear()];case 3:return o.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){var t=Math.floor(Date.now()/1e3)+e.expires_in;return{body:e,expiresAt:Math.min(t,e.decodedToken.claims.exp)}},e.prototype.getCacheKeys=function(){var e;return d(this,void 0,void 0,(function(){var t;return h(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=ii.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"@@auth0spajs@@"===n.prefix&&n.client_id===e.client_id&&n.audience===e.audience&&i}))[0]},e}(),ui=function(){function e(e,t){this.storage=e,this.clientId=t,this.storageKey="a0.spajs.txs."+t,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}(),li=function(e){return"number"==typeof e},fi=["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"],di=b((function(e,t){var n=v&&v.__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}).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}))}}));m(di),di.encode,di.parse,di.getAll;var hi=di.get,pi=di.set,yi=di.remove,vi={get:function(e){var t=hi(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),pi(e,JSON.stringify(t),r)},remove:function(e){yi(e)}},mi={get:function(e){return vi.get(e)||vi.get("_legacy_"+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),pi("_legacy_"+e,JSON.stringify(t),r),vi.save(e,t,n)},remove:function(e){vi.remove(e),vi.remove("_legacy_"+e)}},bi={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)}};var gi,wi=("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Ci8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICAgQ29weXJpZ2h0IChjKSBNaWNyb3NvZnQgQ29ycG9yYXRpb24uCgogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55CiAgICBwdXJwb3NlIHdpdGggb3Igd2l0aG91dCBmZWUgaXMgaGVyZWJ5IGdyYW50ZWQuCgogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgKICAgIFJFR0FSRCBUTyBUSElTIFNPRlRXQVJFIElOQ0xVRElORyBBTEwgSU1QTElFRCBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWQogICAgQU5EIEZJVE5FU1MuIElOIE5PIEVWRU5UIFNIQUxMIFRIRSBBVVRIT1IgQkUgTElBQkxFIEZPUiBBTlkgU1BFQ0lBTCwgRElSRUNULAogICAgSU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9yOncubWVzc2FnZX0pLFsyXTtjYXNlIDU6cmV0dXJuIHY/WzQsdi5qc29uKCldOihkJiZkLmFib3J0KCksaC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KSxbMl0pO2Nhc2UgNjpyZXR1cm4ocj10LnNlbnQoKSkucmVmcmVzaF90b2tlbj8oZnVuY3Rpb24oZSxyLHQpe25bbyhyLHQpXT1lfShyLnJlZnJlc2hfdG9rZW4scyxwKSxkZWxldGUgci5yZWZyZXNoX3Rva2VuKTpmdW5jdGlvbihlLHIpe2RlbGV0ZSBuW28oZSxyKV19KHMscCksaC5wb3N0TWVzc2FnZSh7b2s6di5vayxqc29uOnJ9KSxbMyw4XTtjYXNlIDc6cmV0dXJuIGc9dC5zZW50KCksaC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3JfZGVzY3JpcHRpb246Zy5tZXNzYWdlfX0pLFszLDhdO2Nhc2UgODpyZXR1cm5bMl19dmFyIG0sayxTLF99KSl9KSl9KSl9KCk7Cgo=",null,!1,function(e){return gi=gi||function(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)}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Ci8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICAgQ29weXJpZ2h0IChjKSBNaWNyb3NvZnQgQ29ycG9yYXRpb24uCgogICA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Sl9KSl9KSl9KCk7Cgo=",null,false),new Worker(gi,e)}),Si={},Ii=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 d(this,void 0,void 0,(function(){var n,r;return h(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:y([],p(n))})];case 2:return o.sent(),[2]}}))}))},e.prototype.remove=function(e){return d(this,void 0,void 0,(function(){var t,n;return h(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:y([],p(n))})]:[3,3]):[3,5];case 2:return[2,r.sent()];case 3:return[4,this.cache.remove(this.manifestKey)];case 4:return[2,r.sent()];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"@@auth0spajs@@::"+e},e}(),ki=new xo,Ti={memory:function(){return(new ai).enclosedCache},localstorage:function(){return new ci}},_i=function(e){return Ti[e]},Ei=function(){function e(e){var t,n,r;if(this.options=e,"undefined"!=typeof window&&function(){if(!jo())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===Go())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)r=e.cache;else{if(this.cacheLocation=e.cacheLocation||"memory",!_i(this.cacheLocation))throw new Error('Invalid cache location "'+this.cacheLocation+'"');r=_i(this.cacheLocation)()}this.cookieStorage=!1===e.legacySameSiteCookie?vi:mi,this.orgHintCookieName="auth0."+this.options.client_id+".organization_hint",this.isAuthenticatedCookieName=function(e){return"auth0."+e+".is.authenticated"}(this.options.client_id),this.sessionCheckExpiryDays=e.sessionCheckExpiryDays||1;var o,i=e.useCookiesForTransactions?this.cookieStorage:bi;this.scope=this.options.scope,this.transactionManager=new ui(i,this.options.client_id),this.cacheManager=new si(r,r.allKeys?null:new Ii(r,this.options.client_id)),this.domainUrl=(o=this.options.domain,/^https?:\/\//.test(o)?o:"https://"+o),this.tokenIssuer=function(e,t){return e?e.startsWith("https://")?e:"https://"+e+"/":t+"/"}(this.options.issuer,this.domainUrl),this.defaultScope=oi("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=oi(this.scope,"offline_access")),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&"memory"===this.cacheLocation&&!/Trident.*rv:11\.0/.test(navigator.userAgent)&&(this.worker=new wi),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,f(e,["advancedOptions","audience","auth0Client","authorizeTimeoutInSeconds","cacheLocation","client_id","domain","issuer","leeway","max_age","redirect_uri","scope","useRefreshTokens","useCookiesForTransactions","useFormData"])}(e)}return e.prototype._url=function(e){var t=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||Fo)));return""+this.domainUrl+e+"&auth0Client="+t},e.prototype._getParams=function(e,t,n,r,o){var i=this.options;i.domain,i.leeway,i.useRefreshTokens,i.useCookiesForTransactions,i.useFormData,i.auth0Client,i.cacheLocation,i.advancedOptions;var c=f(i,["domain","leeway","useRefreshTokens","useCookiesForTransactions","useFormData","auth0Client","cacheLocation","advancedOptions"]);return l(l(l({},c),e),{scope:oi(this.defaultScope,this.scope,e.scope),response_type:"code",response_mode:"query",state:t,nonce:n,redirect_uri:o||this.options.redirect_uri,code_challenge:r,code_challenge_method:"S256"})},e.prototype._authorizeUrl=function(e){return this._url("/authorize?"+zo(e))},e.prototype._verifyIdToken=function(e,t,n){return function(e){if(!e.id_token)throw new Error("ID token is required but missing");var t=function(e){var t=e.split("."),n=p(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 c=JSON.parse(Do(o)),a={__raw:e},s={};return Object.keys(c).forEach((function(e){a[e]=c[e],fi.includes(e)||(s[e]=c[e])})),{encoded:{header:r,payload:o,signature:i},header:JSON.parse(Do(r)),claims:a,user:s}}(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 "'+e.iss+'", found "'+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 "'+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 "'+e.aud+'" but was not one of "'+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 "'+e.aud+'", found "'+t.claims.azp+'"')}}else if(t.claims.aud!==e.aud)throw new Error('Audience (aud) claim mismatch in the ID token; expected "'+e.aud+'" but found "'+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 "'+e.nonce+'", found "'+t.claims.nonce+'"')}if(e.max_age&&!li(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(!li(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!li(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(Date.now()),o=new Date(0),i=new Date(0),c=new Date(0);if(c.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 ("+r+") is after expiration time ("+o+")");if(li(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 ("+r+") is before "+i);if(li(t.claims.auth_time)&&r>c)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 ("+r+") is after last auth at "+c);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 "'+e.organizationId+'", found "'+t.claims.org_id+'"')}return t}({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)})},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):this.cookieStorage.remove(this.orgHintCookieName)},e.prototype.buildAuthorizeUrl=function(e){return void 0===e&&(e={}),d(this,void 0,void 0,(function(){var t,n,r,o,i,c,a,s,u,d,p,y;return h(this,(function(h){switch(h.label){case 0:return t=e.redirect_uri,n=e.appState,r=f(e,["redirect_uri","appState"]),o=Bo(Jo()),i=Bo(Jo()),c=Jo(),[4,Ho(c)];case 1:return a=h.sent(),s=Mo(a),u=e.fragment?"#"+e.fragment:"",d=this._getParams(r,o,i,s,t),p=this._authorizeUrl(d),y=e.organization||this.options.organization,this.transactionManager.create(l({nonce:i,code_verifier:c,appState:n,scope:d.scope,audience:d.audience||"default",redirect_uri:d.redirect_uri},y&&{organizationId:y})),[2,p+u]}}))}))},e.prototype.loginWithPopup=function(e,t){return d(this,void 0,void 0,(function(){var n,r,o,i,c,a,s,u,d,p,y,v,m;return h(this,(function(h){switch(h.label){case 0:return 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("","auth0:authorize:popup","left="+t+",top="+n+",width=400,height=600,resizable,scrollbars=yes,status=1")}()),n=f(e,[]),r=Bo(Jo()),o=Bo(Jo()),i=Jo(),[4,Ho(i)];case 1:return c=h.sent(),a=Mo(c),s=this._getParams(n,r,o,a,this.options.redirect_uri||window.location.origin),u=this._authorizeUrl(l(l({},s),{response_mode:"web_message"})),t.popup.location.href=u,[4,No(l(l({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}))];case 2:if(d=h.sent(),r!==d.state)throw new Error("Invalid state");return[4,ni({audience:s.audience,scope:s.scope,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:i,code:d.code,grant_type:"authorization_code",redirect_uri:s.redirect_uri,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData},this.worker)];case 3:return p=h.sent(),y=e.organization||this.options.organization,v=this._verifyIdToken(p.id_token,o,y),m=l(l({},p),{decodedToken:v,scope:s.scope,audience:s.audience||"default",client_id:this.options.client_id}),[4,this.cacheManager.set(m)];case 4:return h.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays}),this._processOrgIdHint(v.claims.org_id),[2]}}))}))},e.prototype.getUser=function(e){return void 0===e&&(e={}),d(this,void 0,void 0,(function(){var t,n,r;return h(this,(function(o){switch(o.label){case 0:return t=e.audience||this.options.audience||"default",n=oi(this.defaultScope,this.scope,e.scope),[4,this.cacheManager.get(new ii({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={}),d(this,void 0,void 0,(function(){var t,n,r;return h(this,(function(o){switch(o.label){case 0:return t=e.audience||this.options.audience||"default",n=oi(this.defaultScope,this.scope,e.scope),[4,this.cacheManager.get(new ii({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={}),d(this,void 0,void 0,(function(){var t,n,r;return h(this,(function(o){switch(o.label){case 0:return t=e.redirectMethod,n=f(e,["redirectMethod"]),[4,this.buildAuthorizeUrl(n)];case 1:return r=o.sent(),window.location[t||"assign"](r),[2]}}))}))},e.prototype.handleRedirectCallback=function(e){return void 0===e&&(e=window.location.href),d(this,void 0,void 0,(function(){var t,n,r,o,i,c,a,s,u,f,d;return h(this,(function(h){switch(h.label){case 0:if(0===(t=e.split("?").slice(1)).length)throw new Error("There are no query params available for parsing.");if(n=function(e){e.indexOf("#")>-1&&(e=e.substr(0,e.indexOf("#")));var t=e.split("&"),n={};return t.forEach((function(e){var t=p(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("")),r=n.state,o=n.code,i=n.error,c=n.error_description,!(a=this.transactionManager.get())||!a.code_verifier)throw new Error("Invalid state");if(this.transactionManager.remove(),i)throw new Lo(i,c,r,a.appState);return s={audience:a.audience,scope:a.scope,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:a.code_verifier,grant_type:"authorization_code",code:o,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData},void 0!==a.redirect_uri&&(s.redirect_uri=a.redirect_uri),[4,ni(s,this.worker)];case 1:return u=h.sent(),f=this._verifyIdToken(u.id_token,a.nonce,a.organizationId),d=l(l({},u),{decodedToken:f,audience:a.audience,scope:a.scope,client_id:this.options.client_id}),[4,this.cacheManager.set(d)];case 2:return h.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays}),this._processOrgIdHint(f.claims.org_id),[2,{appState:a.appState}]}}))}))},e.prototype.checkSession=function(e){return d(this,void 0,void 0,(function(){var t;return h(this,(function(n){switch(n.label){case 0:if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return[2];this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays}),this.cookieStorage.remove("auth0.is.authenticated")}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(),!Wo.includes(t.error))throw t;return[3,4];case 4:return[2]}}))}))},e.prototype.getTokenSilently=function(e){return void 0===e&&(e={}),d(this,void 0,void 0,(function(){var t,n,r,o=this;return h(this,(function(i){return t=l(l({audience:this.options.audience,ignoreCache:!1},e),{scope:oi(this.defaultScope,this.scope,e.scope)}),n=t.ignoreCache,r=f(t,["ignoreCache"]),[2,(c=function(){return o._getTokenSilently(l({ignoreCache:n},r))},a=this.options.client_id+"::"+r.audience+"::"+r.scope,s=Si[a],s||(s=c().finally((function(){delete Si[a],s=null})),Si[a]=s),s)];var c,a,s}))}))},e.prototype._getTokenSilently=function(e){return void 0===e&&(e={}),d(this,void 0,void 0,(function(){var t,n,r,o,i,c,a=this;return h(this,(function(s){switch(s.label){case 0:return t=e.ignoreCache,n=f(e,["ignoreCache"]),r=function(){return d(a,void 0,void 0,(function(){var e;return h(this,(function(t){switch(t.label){case 0:return[4,this.cacheManager.get(new ii({scope:n.scope,audience:n.audience||"default",client_id:this.options.client_id}),60)];case 1:return[2,(e=t.sent())&&e.access_token]}}))}))},t?[3,2]:[4,r()];case 1:if(o=s.sent())return[2,o];s.label=2;case 2:return[4,(u=function(){return ki.acquireLock("auth0.lock.getTokenSilently",5e3)},p=10,void 0===p&&(p=3),d(void 0,void 0,void 0,(function(){var e;return h(this,(function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<p?[4,u()]:[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(!s.sent())return[3,15];s.label=4;case 4:return s.trys.push([4,,12,14]),t?[3,6]:[4,r()];case 5:if(o=s.sent())return[2,o];s.label=6;case 6:return this.options.useRefreshTokens?[4,this._getTokenUsingRefreshToken(n)]:[3,8];case 7:return c=s.sent(),[3,10];case 8:return[4,this._getTokenFromIFrame(n)];case 9:c=s.sent(),s.label=10;case 10:return i=c,[4,this.cacheManager.set(l({client_id:this.options.client_id},i))];case 11:return s.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays}),[2,i.access_token];case 12:return[4,ki.releaseLock("auth0.lock.getTokenSilently")];case 13:return s.sent(),[7];case 14:return[3,16];case 15:throw new Xo;case 16:return[2]}var u,p}))}))},e.prototype.getTokenWithPopup=function(e,t){return void 0===e&&(e={}),void 0===t&&(t={}),d(this,void 0,void 0,(function(){return h(this,(function(n){switch(n.label){case 0:return e.audience=e.audience||this.options.audience,e.scope=oi(this.defaultScope,this.scope,e.scope),t=l(l({},Uo),t),[4,this.loginWithPopup(e,t)];case 1:return n.sent(),[4,this.cacheManager.get(new ii({scope:e.scope,audience:e.audience||"default",client_id:this.options.client_id}))];case 2:return[2,n.sent().access_token]}}))}))},e.prototype.isAuthenticated=function(){return d(this,void 0,void 0,(function(){return h(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=f(e,["federated"]),r=t?"&federated":"";return this._url("/v2/logout?"+zo(n))+r},e.prototype.logout=function(e){var t=this;void 0===e&&(e={});var n=e.localOnly,r=f(e,["localOnly"]);if(n&&r.federated)throw new Error("It is invalid to set both the `federated` and `localOnly` options to `true`");var o=function(){if(t.cookieStorage.remove(t.orgHintCookieName),t.cookieStorage.remove(t.isAuthenticatedCookieName),!n){var e=t.buildLogoutUrl(r);window.location.assign(e)}};if(this.options.cache)return this.cacheManager.clear().then((function(){return o()}));this.cacheManager.clearSync(),o()},e.prototype._getTokenFromIFrame=function(e){return d(this,void 0,void 0,(function(){var t,n,r,o,i,c,a,s,u,d,p,y,v,m,b,g;return h(this,(function(h){switch(h.label){case 0:return t=Bo(Jo()),n=Bo(Jo()),r=Jo(),[4,Ho(r)];case 1:o=h.sent(),i=Mo(o),c=this._getParams(e,t,n,i,e.redirect_uri||this.options.redirect_uri||window.location.origin),(a=this.cookieStorage.get(this.orgHintCookieName))&&!c.organization&&(c.organization=a),s=this._authorizeUrl(l(l({},c),{prompt:"none",response_mode:"web_message"})),u=e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,h.label=2;case 2:if(h.trys.push([2,5,,6]),window.crossOriginIsolated)throw new Vo("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");return[4,(w=s,S=this.domainUrl,I=u,void 0===I&&(I=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 Xo),o()}),1e3*I);r=function(n){if(n.origin==S&&n.data&&"authorization_response"===n.data.type){var c=n.source;c&&c.close(),n.data.response.error?t(Vo.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",w)})))];case 3:if(d=h.sent(),t!==d.state)throw new Error("Invalid state");return p=e.scope,y=e.audience,v=f(e,["scope","audience","redirect_uri","ignoreCache","timeoutInSeconds"]),[4,ni(l(l(l({},this.customOptions),v),{scope:p,audience:y,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:r,code:d.code,grant_type:"authorization_code",redirect_uri:c.redirect_uri,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData}),this.worker)];case 4:return m=h.sent(),b=this._verifyIdToken(m.id_token,n),this._processOrgIdHint(b.claims.org_id),[2,l(l({},m),{decodedToken:b,scope:c.scope,audience:c.audience||"default"})];case 5:throw"login_required"===(g=h.sent()).error&&this.logout({localOnly:!0}),g;case 6:return[2]}var w,S,I}))}))},e.prototype._getTokenUsingRefreshToken=function(e){return d(this,void 0,void 0,(function(){var t,n,r,o,i,c,a,s,u;return h(this,(function(d){switch(d.label){case 0:return e.scope=oi(this.defaultScope,this.options.scope,e.scope),[4,this.cacheManager.get(new ii({scope:e.scope,audience:e.audience||"default",client_id:this.options.client_id}))];case 1:return(t=d.sent())&&t.refresh_token||this.worker?[3,3]:[4,this._getTokenFromIFrame(e)];case 2:return[2,d.sent()];case 3:n=e.redirect_uri||this.options.redirect_uri||window.location.origin,o=e.scope,i=e.audience,c=f(e,["scope","audience","ignoreCache","timeoutInSeconds"]),a="number"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null,d.label=4;case 4:return d.trys.push([4,6,,9]),[4,ni(l(l(l(l(l({},this.customOptions),c),{audience:i,scope:o,baseUrl:this.domainUrl,client_id:this.options.client_id,grant_type:"refresh_token",refresh_token:t&&t.refresh_token,redirect_uri:n}),a&&{timeout:a}),{auth0Client:this.options.auth0Client,useFormData:this.options.useFormData}),this.worker)];case 5:return r=d.sent(),[3,9];case 6:return"The web worker is missing the refresh token"===(s=d.sent()).message||s.message&&s.message.indexOf("invalid refresh token")>-1?[4,this._getTokenFromIFrame(e)]:[3,8];case 7:return[2,d.sent()];case 8:throw s;case 9:return u=this._verifyIdToken(r.id_token),[2,l(l({},r),{decodedToken:u,scope:e.scope,audience:e.audience||"default"})]}}))}))},e}(),Oi={isAuthenticated:!1,isLoading:!0},Ki=function(){throw new Error("You forgot to wrap your component in <Auth0Provider>.")},Ci=o(o({},Oi),{buildAuthorizeUrl:Ki,buildLogoutUrl:Ki,getAccessTokenSilently:Ki,getAccessTokenWithPopup:Ki,getIdTokenClaims:Ki,loginWithRedirect:Ki,loginWithPopup:Ki,logout:Ki,handleRedirectCallback:Ki}),Ri=t.createContext(Ci),Zi=function(e){function t(t,n){var r=e.call(this,n||t)||this;return r.error=t,r.error_description=n,r}return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error),xi=/[?&]code=[^&]+/,Ui=/[?&]state=[^&]+/,Wi=/[?&]error=[^&]+/,Fi=function(e){return function(t){return"error"in t?new Zi(t.error,t.error_description):t instanceof Error?t:new Error(e)}},Vi=Fi("Login failed"),Li=Fi("Get access token failed"),Xi=function(e,t){var n,r;switch(t.type){case"LOGIN_POPUP_STARTED":return o(o({},e),{isLoading:!0});case"LOGIN_POPUP_COMPLETE":case"INITIALISED":return o(o({},e),{isAuthenticated:!!t.user,user:t.user,isLoading:!1,error:void 0});case"HANDLE_REDIRECT_COMPLETE":case"GET_ACCESS_TOKEN_COMPLETE":return(null===(n=e.user)||void 0===n?void 0:n.updated_at)===(null===(r=t.user)||void 0===r?void 0:r.updated_at)?e:o(o({},e),{isAuthenticated:!!t.user,user:t.user});case"LOGOUT":return o(o({},e),{isAuthenticated:!1,user:void 0});case"ERROR":return o(o({},e),{isLoading:!1,error:t.error})}},Yi=function(e){if(e){var t=e.redirectUri,n=i(e,["redirectUri"]);return o(o({},n),{redirect_uri:t})}},Ai=function(e){window.history.replaceState({},document.title,(null==e?void 0:e.returnTo)||window.location.pathname)},Pi=function(){return t.useContext(Ri)},Ni=function(){return n.createElement(n.Fragment,null)},ji=function(){return""+window.location.pathname+window.location.search};e.Auth0Context=Ri,e.Auth0Provider=function(e){var r=e.children,s=e.skipRedirectCallback,u=e.onRedirectCallback,l=void 0===u?Ai:u,f=i(e,["children","skipRedirectCallback","onRedirectCallback"]),d=t.useState((function(){return new Ei(function(e){var t=e.clientId,n=e.redirectUri,r=e.maxAge,c=i(e,["clientId","redirectUri","maxAge"]);return o(o({},c),{client_id:t,redirect_uri:n,max_age:r,auth0Client:{name:"auth0-react",version:"1.8.0"}})}(f))}))[0],h=t.useReducer(Xi,Oi),p=h[0],y=h[1];t.useEffect((function(){c(void 0,void 0,void 0,(function(){var e,t,n;return a(this,(function(r){switch(r.label){case 0:return r.trys.push([0,6,,7]),void 0===o&&(o=window.location.search),!xi.test(o)&&!Wi.test(o)||!Ui.test(o)||s?[3,2]:[4,d.handleRedirectCallback()];case 1:return e=r.sent().appState,l(e),[3,4];case 2:return[4,d.checkSession()];case 3:r.sent(),r.label=4;case 4:return[4,d.getUser()];case 5:return t=r.sent(),y({type:"INITIALISED",user:t}),[3,7];case 6:return n=r.sent(),y({type:"ERROR",error:Vi(n)}),[3,7];case 7:return[2]}var o}))}))}),[d,l,s]);var v=t.useCallback((function(e){return d.buildAuthorizeUrl(Yi(e))}),[d]),m=t.useCallback((function(e){return d.buildLogoutUrl(e)}),[d]),b=t.useCallback((function(e){return d.loginWithRedirect(Yi(e))}),[d]),g=t.useCallback((function(e,t){return c(void 0,void 0,void 0,(function(){var n,r;return a(this,(function(o){switch(o.label){case 0:y({type:"LOGIN_POPUP_STARTED"}),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,d.loginWithPopup(e,t)];case 2:return o.sent(),[3,4];case 3:return n=o.sent(),y({type:"ERROR",error:Vi(n)}),[2];case 4:return[4,d.getUser()];case 5:return r=o.sent(),y({type:"LOGIN_POPUP_COMPLETE",user:r}),[2]}}))}))}),[d]),w=t.useCallback((function(e){void 0===e&&(e={});var t=d.logout(e);if(e.localOnly){if(t&&"function"==typeof t.then)return t.then((function(){return y({type:"LOGOUT"})}));y({type:"LOGOUT"})}return t}),[d]),S=t.useCallback((function(e){return c(void 0,void 0,void 0,(function(){var t,n,r,o;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,3,5]),[4,d.getTokenSilently(e)];case 1:return t=i.sent(),[3,5];case 2:throw n=i.sent(),Li(n);case 3:return r=y,o={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,d.getUser()];case 4:return r.apply(void 0,[(o.user=i.sent(),o)]),[7];case 5:return[2,t]}}))}))}),[d]),I=t.useCallback((function(e,t){return c(void 0,void 0,void 0,(function(){var n,r,o,i;return a(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,3,5]),[4,d.getTokenWithPopup(e,t)];case 1:return n=c.sent(),[3,5];case 2:throw r=c.sent(),Li(r);case 3:return o=y,i={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,d.getUser()];case 4:return o.apply(void 0,[(i.user=c.sent(),i)]),[7];case 5:return[2,n]}}))}))}),[d]),k=t.useCallback((function(e){return d.getIdTokenClaims(e)}),[d]),T=t.useCallback((function(e){return c(void 0,void 0,void 0,(function(){var t,n,r;return a(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,3,5]),[4,d.handleRedirectCallback(e)];case 1:return[2,o.sent()];case 2:throw t=o.sent(),Li(t);case 3:return n=y,r={type:"HANDLE_REDIRECT_COMPLETE"},[4,d.getUser()];case 4:return n.apply(void 0,[(r.user=o.sent(),r)]),[7];case 5:return[2]}}))}))}),[d]);return n.createElement(Ri.Provider,{value:o(o({},p),{buildAuthorizeUrl:v,buildLogoutUrl:m,getAccessTokenSilently:S,getAccessTokenWithPopup:I,getIdTokenClaims:k,loginWithRedirect:b,loginWithPopup:g,logout:w,handleRedirectCallback:T})},r)},e.InMemoryCache=ai,e.LocalStorageCache=ci,e.OAuthError=Zi,e.User=function(){},e.useAuth0=Pi,e.withAuth0=function(e){return function(t){return n.createElement(Ri.Consumer,null,(function(r){return n.createElement(e,o({auth0:r},t))}))}},e.withAuthenticationRequired=function(e,r){return void 0===r&&(r={}),function(i){var s=this,u=Pi(),l=u.user,f=u.isAuthenticated,d=u.isLoading,h=u.loginWithRedirect,p=r.returnTo,y=void 0===p?ji:p,v=r.onRedirecting,m=void 0===v?Ni:v,b=r.loginOptions,g=void 0===b?{}:b,w=r.claimCheck,S=f&&(void 0===w?function(){return!0}:w)(l);return t.useEffect((function(){if(!d&&!S){var e=o(o({},g),{appState:o(o({},g.appState),{returnTo:"function"==typeof y?y():y})});c(s,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,h(e)];case 1:return t.sent(),[2]}}))}))}}),[d,S,h,g,y]),S?n.createElement(e,o({},i)):m()}},Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
30
30
|
//# sourceMappingURL=auth0-react.min.js.map
|