@okta/okta-auth-js 6.3.1 → 6.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see okta-auth-js.min.js.LICENSE.txt */
2
- var OktaAuth;!function(){var e={7228:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},2858:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},3646:function(e,t,n){var r=n(7228);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},1506:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},4575:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},9100:function(e,t,n){var r=n(9489),o=n(7067);function a(t,n,i){return o()?(e.exports=a=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=a=function(e,t,n){var o=[null];o.push.apply(o,t);var a=new(Function.bind.apply(e,o));return n&&r(a,n.prototype),a},e.exports.default=e.exports,e.exports.__esModule=!0),a.apply(null,arguments)}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},3913:function(e){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)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},9713:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},6525:function(e,t,n){var r=n(8331);function o(t,n,a){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=o=Reflect.get,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var o=r(e,t);if(o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(n):a.value}},e.exports.default=e.exports,e.exports.__esModule=!0),o(t,n,a||t)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},9754:function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},2205:function(e,t,n){var r=n(9489);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},5318:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},430:function(e){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.default=e.exports,e.exports.__esModule=!0},7067:function(e){e.exports=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}},e.exports.default=e.exports,e.exports.__esModule=!0},6860:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},3884:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,s=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(s)throw o}}return a}},e.exports.default=e.exports,e.exports.__esModule=!0},521:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},8206:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},8585:function(e,t,n){var r=n(8).default,o=n(1506);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},9489:function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},3038:function(e,t,n){var r=n(2858),o=n(3884),a=n(379),i=n(521);e.exports=function(e,t){return r(e)||o(e,t)||a(e,t)||i()},e.exports.default=e.exports,e.exports.__esModule=!0},8331:function(e,t,n){var r=n(9754);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e},e.exports.default=e.exports,e.exports.__esModule=!0},319:function(e,t,n){var r=n(3646),o=n(6860),a=n(379),i=n(8206);e.exports=function(e){return r(e)||o(e)||a(e)||i()},e.exports.default=e.exports,e.exports.__esModule=!0},8:function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=t=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},379:function(e,t,n){var r=n(7228);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},5957:function(e,t,n){var r=n(9754),o=n(9489),a=n(430),i=n(9100);function s(t){var n="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!a(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return i(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0,s(t)}e.exports=s,e.exports.default=e.exports,e.exports.__esModule=!0},7757:function(e,t,n){e.exports=n(5666)},3615:function(e,t,n){"use strict";var r=n(4575),o=n(3913),a=n(2205),i=n(8585),s=n(9754);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=function(e){a(c,e);var t,n,u=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=s(t);if(n){var o=s(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return i(this,e)});function c(e){var t;return r(this,c),(t=u.call(this,e||"Promise was canceled")).name="CancelError",t}return o(c,[{key:"isCanceled",get:function(){return!0}}]),c}(n(5957)(Error)),l=function(){function e(t){var n=this;r(this,e),this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((function(e,r){n._reject=r;var o=function(e){if(!n._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");n._cancelHandlers.push(e)};return Object.defineProperties(o,{shouldReject:{get:function(){return n._rejectOnCancel},set:function(e){n._rejectOnCancel=e}}}),t((function(t){n._isCanceled&&o.shouldReject||(n._isPending=!1,e(t))}),(function(e){n._isPending=!1,r(e)}),o)}))}return o(e,[{key:"then",value:function(e,t){return this._promise.then(e,t)}},{key:"catch",value:function(e){return this._promise.catch(e)}},{key:"finally",value:function(e){return this._promise.finally(e)}},{key:"cancel",value:function(e){if(this._isPending&&!this._isCanceled){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}(this._cancelHandlers);try{for(n.s();!(t=n.n()).done;)(0,t.value)()}catch(e){n.e(e)}finally{n.f()}}catch(e){return void this._reject(e)}this._rejectOnCancel&&this._reject(new c(e))}}},{key:"isCanceled",get:function(){return this._isCanceled}}],[{key:"fn",value:function(t){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return new e((function(e,n,o){r.push(o),t.apply(void 0,r).then(e,n)}))}}}]),e}();Object.setPrototypeOf(l.prototype,Promise.prototype),e.exports=l,e.exports.CancelError=c},3269:function(e,t,n){"use strict";var r=n(5318);t.AuthStateManager=t.INITIAL_AUTH_STATE=void 0;var o=r(n(7757)),a=r(n(4575)),i=r(n(3913)),s=r(n(3615)),u=n(5705),c=n(8965),l=n(2231),f=r(n(1673));t.INITIAL_AUTH_STATE=null;var d={updateAuthStatePromise:null,canceledTimes:0},h="authStateChange",p=function(){function e(t){var n=this;if((0,a.default)(this,e),!t.emitter)throw new u.AuthSdkError("Emitter should be initialized before AuthStateManager");this._sdk=t,this._pending=Object.assign({},d),this._authState=null,this._logOptions={},this._prevAuthState=null,this._transformQueue=new f.default({quiet:!0}),t.tokenManager.on(l.EVENT_ADDED,(function(e,t){n._setLogOptions({event:l.EVENT_ADDED,key:e,token:t}),n.updateAuthState()})),t.tokenManager.on(l.EVENT_REMOVED,(function(e,t){n._setLogOptions({event:l.EVENT_REMOVED,key:e,token:t}),n.updateAuthState()}))}return(0,i.default)(e,[{key:"_setLogOptions",value:function(e){this._logOptions=e}},{key:"getAuthState",value:function(){return this._authState}},{key:"getPreviousAuthState",value:function(){return this._prevAuthState}},{key:"updateAuthState",value:function(){return e=this,t=void 0,n=void 0,r=o.default.mark((function e(){var t,n,r,a,i,u,l,f=this;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this._sdk.options,n=t.transformAuthState,r=t.devMode,a=function(e){var t=f._logOptions,n=t.event,r=t.key,o=t.token;(0,c.getConsole)().group("OKTA-AUTH-JS:updateAuthState: Event:".concat(n," Status:").concat(e)),(0,c.getConsole)().log(r,o),(0,c.getConsole)().log("Current authState",f._authState),(0,c.getConsole)().groupEnd(),f._logOptions={}},i=function(e){var t,n;n=e,(t=f._authState)&&t.isAuthenticated===n.isAuthenticated&&JSON.stringify(t.idToken)===JSON.stringify(n.idToken)&&JSON.stringify(t.accessToken)===JSON.stringify(n.accessToken)&&t.error===n.error?r&&a("unchanged"):(f._prevAuthState=f._authState,f._authState=e,f._sdk.emitter.emit(h,Object.assign({},e)),r&&a("emitted"))},u=function e(t){return f._pending.updateAuthStatePromise.then((function(){var n=f._pending.updateAuthStatePromise;return n&&n!==t?e(n):f.getAuthState()}))},!this._pending.updateAuthStatePromise){e.next=11;break}if(!(this._pending.canceledTimes>=10)){e.next=10;break}return r&&a("terminated"),e.abrupt("return",u(this._pending.updateAuthStatePromise));case 10:this._pending.updateAuthStatePromise.cancel();case 11:return l=new s.default((function(e,t,o){o.shouldReject=!1,o((function(){f._pending.updateAuthStatePromise=null,f._pending.canceledTimes=f._pending.canceledTimes+1,r&&a("canceled")}));var s=function(t){l.isCanceled?e():(i(t),e(),f._pending=Object.assign({},d))};f._sdk.isAuthenticated().then((function(){if(l.isCanceled)e();else{var t=f._sdk.tokenManager.getTokensSync(),r=t.accessToken,o=t.idToken,a=t.refreshToken,i={accessToken:r,idToken:o,refreshToken:a,isAuthenticated:!(!r||!o)};(n?f._transformQueue.push(n,null,f._sdk,i):Promise.resolve(i)).then((function(e){return s(e)})).catch((function(e){return s({accessToken:r,idToken:o,refreshToken:a,isAuthenticated:!1,error:e})}))}}))})),this._pending.updateAuthStatePromise=l,e.abrupt("return",u(l));case 14:case"end":return e.stop()}}),e,this)})),new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}));var e,t,n,r}},{key:"subscribe",value:function(e){this._sdk.emitter.on(h,e)}},{key:"unsubscribe",value:function(e){this._sdk.emitter.off(h,e)}}]),e}();t.AuthStateManager=p},625:function(e,t,n){"use strict";var r=n(5318),o=n(8);t.default=void 0;var a=r(n(7757)),i=r(n(4575)),s=r(n(3913)),u=I(n(3754)),c=n(7847),l=r(n(6973)),f=n(3427),d=n(6496),h=I(n(9426)),p=I(n(5637)),v=I(n(2814)),y=r(n(7501)),g=n(8965),m=n(2231),b=n(2043),k=n(2924),w=r(n(1673)),O=r(n(792)),E=n(3269),S=n(500),T=r(n(1796)),_=n(2133),x=n(6141),A=n(463),R=n(5406),P=n(5037),j=n(4456),C=r(n(4279));function M(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(M=function(e){return e?n:t})(e)}function I(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=M(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=a?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}var D=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))},L=function(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},N=function(){function e(t){var n=this;(0,i.default)(this,e);var r=this.options=(0,_.buildOptions)(t);this.storageManager=new S.StorageManager(r.storageManager,r.cookies,r.storageUtil),this.transactionManager=new T.default(Object.assign({storageManager:this.storageManager},r.transactionManager)),this._oktaUserAgent=new R.OktaUserAgent,this.tx={status:c.transactionStatus.bind(null,this),resume:c.resumeTransaction.bind(null,this),exists:Object.assign(c.transactionExists.bind(null,this),{_get:function(e){return r.storageUtil.storage.get(e)}}),introspect:c.introspectAuthn.bind(null,this)},this.pkce={DEFAULT_CODE_CHALLENGE_METHOD:l.default.DEFAULT_CODE_CHALLENGE_METHOD,generateVerifier:l.default.generateVerifier,computeChallenge:l.default.computeChallenge},Object.assign(this.options.storageUtil,{getPKCEStorage:this.storageManager.getLegacyPKCEStorage.bind(this.storageManager),getHttpCache:this.storageManager.getHttpCache.bind(this.storageManager)}),this._pending={handleLogin:!1},(0,h.isBrowser)()&&(this.options=Object.assign(this.options,{redirectUri:(0,g.toAbsoluteUrl)(t.redirectUri,window.location.origin)})),t.maxClockSkew||0===t.maxClockSkew?this.options.maxClockSkew=t.maxClockSkew:this.options.maxClockSkew=u.DEFAULT_MAX_CLOCK_SKEW,this.options.ignoreLifetime=!!t.ignoreLifetime,this.session={close:f.closeSession.bind(null,this),exists:f.sessionExists.bind(null,this),get:f.getSession.bind(null,this),refresh:f.refreshSession.bind(null,this),setCookieAndRedirect:f.setCookieAndRedirect.bind(null,this)},this._tokenQueue=new w.default;var o=function(e){return w.default.prototype.push.bind(n._tokenQueue,e,null)},a=o(d.getWithRedirect.bind(null,this)),s=Object.assign(a,{_setLocation:function(e){window.location=e}}),p=o(d.parseFromUrl.bind(null,this)),v=Object.assign(p,{_getHistory:function(){return window.history},_getLocation:function(){return window.location},_getDocument:function(){return window.document}});this.token={prepareTokenParams:d.prepareTokenParams.bind(null,this),exchangeCodeForTokens:d.exchangeCodeForTokens.bind(null,this),getWithoutPrompt:d.getWithoutPrompt.bind(null,this),getWithPopup:d.getWithPopup.bind(null,this),getWithRedirect:s,parseFromUrl:v,decode:d.decodeToken,revoke:d.revokeToken.bind(null,this),renew:d.renewToken.bind(null,this),renewTokensWithRefresh:d.renewTokensWithRefresh.bind(null,this),renewTokens:d.renewTokens.bind(null,this),getUserInfo:d.getUserInfo.bind(null,this),verify:d.verifyToken.bind(null,this),isLoginRedirect:d.isLoginRedirect.bind(null,this)};var y=["decode","isLoginRedirect","getWithRedirect","parseFromUrl"];Object.keys(this.token).forEach((function(e){if(!(y.indexOf(e)>=0)){var t=n.token[e];n.token[e]=w.default.prototype.push.bind(n._tokenQueue,t,null)}}));var P=x.startTransaction.bind(null,this);this.idx={interact:x.interact.bind(null,this),introspect:x.introspect.bind(null,this),authenticate:x.authenticate.bind(null,this),register:x.register.bind(null,this),start:P,startTransaction:P,poll:x.poll.bind(null,this),proceed:x.proceed.bind(null,this),cancel:x.cancel.bind(null,this),recoverPassword:x.recoverPassword.bind(null,this),handleInteractionCodeRedirect:x.handleInteractionCodeRedirect.bind(null,this),isInteractionRequired:d.isInteractionRequired.bind(null,this),isInteractionRequiredError:d.isInteractionRequiredError,handleEmailVerifyCallback:x.handleEmailVerifyCallback.bind(null,this),isEmailVerifyCallback:x.isEmailVerifyCallback,parseEmailVerifyCallback:x.parseEmailVerifyCallback,isEmailVerifyCallbackError:x.isEmailVerifyCallbackError,getSavedTransactionMeta:j.getSavedTransactionMeta.bind(null,this),createTransactionMeta:j.createTransactionMeta.bind(null,this),getTransactionMeta:j.getTransactionMeta.bind(null,this),saveTransactionMeta:j.saveTransactionMeta.bind(null,this),clearTransactionMeta:j.clearTransactionMeta.bind(null,this),isTransactionMetaValid:j.isTransactionMetaValid,setFlow:function(e){n.options.flow=e},getFlow:function(){return n.options.flow},canProceed:x.canProceed.bind(null,this),unlockAccount:x.unlockAccount.bind(null,this)},(0,A.setGlobalRequestInterceptor)((0,A.createGlobalRequestInterceptor)(this)),this.http={setRequestHeader:k.setRequestHeader.bind(null,this)},this.fingerprint=O.default.bind(null,this),this.emitter=new C.default,this.tokenManager=new m.TokenManager(this,t.tokenManager),this.authStateManager=new E.AuthStateManager(this),this.serviceManager=new b.ServiceManager(this,t.services)}return(0,s.default)(e,[{key:"start",value:function(){this.tokenManager.start(),this.token.isLoginRedirect()||this.authStateManager.updateAuthState(),this.serviceManager.start()}},{key:"stop",value:function(){this.tokenManager.stop(),this.serviceManager.stop()}},{key:"setHeaders",value:function(e){this.options.headers=Object.assign({},this.options.headers,e)}},{key:"signIn",value:function(e){return D(this,void 0,void 0,a.default.mark((function t(){return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.signInWithCredentials(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"signInWithCredentials",value:function(e){return D(this,void 0,void 0,a.default.mark((function t(){var n,r=this;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=(0,g.clone)(e||{}),n=function(t){return delete e.sendFingerprint,(0,c.postToTransaction)(r,"/api/v1/authn",e,t)},e.sendFingerprint){t.next=4;break}return t.abrupt("return",n());case 4:return t.abrupt("return",this.fingerprint().then((function(e){return n({headers:{"X-Device-Fingerprint":e}})})));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"signInWithRedirect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return D(this,void 0,void 0,a.default.mark((function t(){var n,r,o;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.originalUri,r=L(e,["originalUri"]),!this._pending.handleLogin){t.next=3;break}return t.abrupt("return");case 3:return this._pending.handleLogin=!0,t.prev=4,n&&this.setOriginalUri(n),o=Object.assign({scopes:this.options.scopes||["openid","email","profile"]},r),t.next=9,this.token.getWithRedirect(o);case 9:return t.prev=9,this._pending.handleLogin=!1,t.finish(9);case 12:case"end":return t.stop()}}),t,this,[[4,,9,12]])})))}},{key:"closeSession",value:function(){var e=this;return this.session.close().then((function(){return D(e,void 0,void 0,a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.tokenManager.clear();case 1:case"end":return e.stop()}}),e,this)})))})).catch((function(e){if("AuthApiError"===e.name&&"E0000007"===e.errorCode)return null;throw e}))}},{key:"revokeAccessToken",value:function(e){return D(this,void 0,void 0,a.default.mark((function t(){var n;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=6;break}return t.next=3,this.tokenManager.getTokens();case 3:e=t.sent.accessToken,n=this.tokenManager.getStorageKeyByType("accessToken"),this.tokenManager.remove(n);case 6:if(e){t.next=8;break}return t.abrupt("return",Promise.resolve(null));case 8:return t.abrupt("return",this.token.revoke(e));case 9:case"end":return t.stop()}}),t,this)})))}},{key:"revokeRefreshToken",value:function(e){return D(this,void 0,void 0,a.default.mark((function t(){var n;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=6;break}return t.next=3,this.tokenManager.getTokens();case 3:e=t.sent.refreshToken,n=this.tokenManager.getStorageKeyByType("refreshToken"),this.tokenManager.remove(n);case 6:if(e){t.next=8;break}return t.abrupt("return",Promise.resolve(null));case 8:return t.abrupt("return",this.token.revoke(e));case 9:case"end":return t.stop()}}),t,this)})))}},{key:"getSignOutRedirectUrl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.idToken,n=e.postLogoutRedirectUri,r=e.state;if(t||(t=this.tokenManager.getTokensSync().idToken),!t)return"";n||(n=this.options.postLogoutRedirectUri);var o=(0,d.getOAuthUrls)(this).logoutUrl,a=t.idToken,i=o+"?id_token_hint="+encodeURIComponent(a);return n&&(i+="&post_logout_redirect_uri="+encodeURIComponent(n)),r&&(i+="&state="+encodeURIComponent(r)),i}},{key:"signOut",value:function(e){return D(this,void 0,void 0,a.default.mark((function t(){var n,r,o,i,s,u,c,l;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=Object.assign({},e),n=window.location.origin,r=window.location.href,o=e.postLogoutRedirectUri||this.options.postLogoutRedirectUri||n,i=e.accessToken,s=e.refreshToken,u=!1!==e.revokeAccessToken,(c=!1!==e.revokeRefreshToken)&&void 0===s&&(s=this.tokenManager.getTokensSync().refreshToken),u&&void 0===i&&(i=this.tokenManager.getTokensSync().accessToken),e.idToken||(e.idToken=this.tokenManager.getTokensSync().idToken),!c||!s){t.next=14;break}return t.next=14,this.revokeRefreshToken(s);case 14:if(!u||!i){t.next=17;break}return t.next=17,this.revokeAccessToken(i);case 17:if(l=this.getSignOutRedirectUrl(Object.assign(Object.assign({},e),{postLogoutRedirectUri:o}))){t.next=22;break}return t.abrupt("return",this.closeSession().then((function(){o===r?window.location.reload():window.location.assign(o)})));case 22:e.clearTokensBeforeRedirect?this.tokenManager.clear():this.tokenManager.addPendingRemoveFlags(),window.location.assign(l);case 24:case"end":return t.stop()}}),t,this)})))}},{key:"webfinger",value:function(e){var t="/.well-known/webfinger"+(0,g.toQueryString)(e);return(0,k.get)(this,t,{headers:{Accept:"application/jrd+json"}})}},{key:"isAuthenticated",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return D(this,void 0,void 0,a.default.mark((function t(){var n,r,o,i,s,u,c,l,f;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.tokenManager.getOptions(),r=n.autoRenew,o=n.autoRemove,i=e.onExpiredToken?"renew"===e.onExpiredToken:r,s=e.onExpiredToken?"remove"===e.onExpiredToken:o,u=this.tokenManager.getTokensSync(),!(c=u.accessToken)||!this.tokenManager.hasExpired(c)){t.next=18;break}if(c=void 0,!i){t.next=17;break}return t.prev=7,t.next=10,this.tokenManager.renew("accessToken");case 10:c=t.sent,t.next=15;break;case 13:t.prev=13,t.t0=t.catch(7);case 15:t.next=18;break;case 17:s&&this.tokenManager.remove("accessToken");case 18:if(l=this.tokenManager.getTokensSync(),!(f=l.idToken)||!this.tokenManager.hasExpired(f)){t.next=33;break}if(f=void 0,!i){t.next=32;break}return t.prev=22,t.next=25,this.tokenManager.renew("idToken");case 25:f=t.sent,t.next=30;break;case 28:t.prev=28,t.t1=t.catch(22);case 30:t.next=33;break;case 32:s&&this.tokenManager.remove("idToken");case 33:return t.abrupt("return",!(!c||!f));case 34:case"end":return t.stop()}}),t,this,[[7,13],[22,28]])})))}},{key:"getUser",value:function(){return D(this,void 0,void 0,a.default.mark((function e(){var t,n,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.tokenManager.getTokensSync(),n=t.idToken,r=t.accessToken,e.abrupt("return",this.token.getUserInfo(r,n));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"getIdToken",value:function(){var e=this.tokenManager.getTokensSync().idToken;return e?e.idToken:void 0}},{key:"getAccessToken",value:function(){var e=this.tokenManager.getTokensSync().accessToken;return e?e.accessToken:void 0}},{key:"getRefreshToken",value:function(){var e=this.tokenManager.getTokensSync().refreshToken;return e?e.refreshToken:void 0}},{key:"storeTokensFromRedirect",value:function(){return D(this,void 0,void 0,a.default.mark((function e(){var t,n;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.token.parseFromUrl();case 2:t=e.sent,n=t.tokens,this.tokenManager.setTokens(n);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"setOriginalUri",value:function(e,t){y.default.getSessionStorage().setItem(u.REFERRER_PATH_STORAGE_KEY,e),(t=t||this.options.state)&&this.storageManager.getOriginalUriStorage().setItem(t,e)}},{key:"getOriginalUri",value:function(e){if(e=e||this.options.state){var t=this.storageManager.getOriginalUriStorage().getItem(e);if(t)return t}var n=y.default.getSessionStorage();return n&&n.getItem(u.REFERRER_PATH_STORAGE_KEY)||void 0}},{key:"removeOriginalUri",value:function(e){if(y.default.getSessionStorage().removeItem(u.REFERRER_PATH_STORAGE_KEY),e=e||this.options.state){var t=this.storageManager.getOriginalUriStorage();t.removeItem&&t.removeItem(e)}}},{key:"isLoginRedirect",value:function(){return(0,d.isLoginRedirect)(this)}},{key:"handleLoginRedirect",value:function(e,t){return D(this,void 0,void 0,a.default.mark((function n(){var r,o,i;return a.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=this.options.state,!e){n.next=6;break}this.tokenManager.setTokens(e),t=t||this.getOriginalUri(this.options.state),n.next=25;break;case 6:if(!this.isLoginRedirect()){n.next=24;break}return n.prev=7,n.next=10,(0,P.parseOAuthResponseFromUrl)(this,{});case 10:return o=n.sent,r=o.state,t=t||this.getOriginalUri(r),n.next=15,this.storeTokensFromRedirect();case 15:n.next=22;break;case 17:return n.prev=17,n.t0=n.catch(7),n.next=21,this.authStateManager.updateAuthState();case 21:throw n.t0;case 22:n.next=25;break;case 24:return n.abrupt("return");case 25:return n.next=27,this.authStateManager.updateAuthState();case 27:if(this.removeOriginalUri(r),!(i=this.options.restoreOriginalUri)){n.next=34;break}return n.next=32,i(this,t);case 32:n.next=35;break;case 34:t&&window.location.replace(t);case 35:case"end":return n.stop()}}),n,this,[[7,17]])})))}},{key:"isPKCE",value:function(){return!!this.options.pkce}},{key:"hasResponseType",value:function(e){return Array.isArray(this.options.responseType)&&this.options.responseType.length?this.options.responseType.indexOf(e)>=0:this.options.responseType===e}},{key:"isAuthorizationCodeFlow",value:function(){return this.hasResponseType("code")}},{key:"getIssuerOrigin",value:function(){return this.options.issuer.split("/oauth2/")[0]}},{key:"forgotPassword",value:function(e){return(0,c.postToTransaction)(this,"/api/v1/authn/recovery/password",e)}},{key:"unlockAccount",value:function(e){return(0,c.postToTransaction)(this,"/api/v1/authn/recovery/unlock",e)}},{key:"verifyRecoveryToken",value:function(e){return(0,c.postToTransaction)(this,"/api/v1/authn/recovery/token",e)}},{key:"invokeApiMethod",value:function(e){return D(this,void 0,void 0,a.default.mark((function t(){var n;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.accessToken){t.next=5;break}return t.next=3,this.tokenManager.getTokens();case 3:n=t.sent.accessToken,e.accessToken=null==n?void 0:n.accessToken;case 5:return t.abrupt("return",(0,k.httpRequest)(this,e));case 6:case"end":return t.stop()}}),t,this)})))}}]),e}();N.features=N.prototype.features=h,N.crypto=p,N.webauthn=v,Object.assign(N,{constants:u});var U=N;t.default=U,e.exports=t.default},5406:function(e,t,n){"use strict";var r=n(5318);t.OktaUserAgent=void 0;var o=r(n(4575)),a=r(n(3913)),i=n(9426),s=function(){function e(){(0,o.default)(this,e),this.environments=["okta-auth-js/".concat("6.3.1")]}return(0,a.default)(e,[{key:"addEnvironment",value:function(e){this.environments.push(e)}},{key:"getHttpHeader",value:function(){return this.maybeAddNodeEnvironment(),{"X-Okta-User-Agent-Extended":this.environments.join(" ")}}},{key:"getVersion",value:function(){return"6.3.1"}},{key:"maybeAddNodeEnvironment",value:function(){if(!(0,i.isBrowser)()&&process&&process.versions){var e=process.versions.node;this.environments.push("nodejs/".concat(e))}}}]),e}();t.OktaUserAgent=s},1673:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(3913)),i=n(8965),s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{quiet:!1};(0,o.default)(this,e),this.queue=[],this.running=!1,this.options=t}return(0,a.default)(e,[{key:"push",value:function(e,t){for(var n=this,r=arguments.length,o=new Array(r>2?r-2:0),a=2;a<r;a++)o[a-2]=arguments[a];return new Promise((function(r,a){n.queue.length>0&&!1!==n.options.quiet&&(0,i.warn)("Async method is being called but another async method is already running. The new method will be delayed until the previous method completes."),n.queue.push({method:e,thisObject:t,args:o,resolve:r,reject:a}),n.run()}))}},{key:"run",value:function(){var e=this;if(!this.running&&0!==this.queue.length){this.running=!0;var t=this.queue.shift(),n=t.method.apply(t.thisObject,t.args);(0,i.isPromise)(n)?n.then(t.resolve,t.reject).finally((function(){e.running=!1,e.run()})):(t.resolve(n),this.running=!1,this.run())}}}]),e}(),u=s;t.default=u,e.exports=t.default},472:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(7948)),s=function(){function e(t,n){if((0,o.default)(this,e),!t)throw new i.default('"storage" is required');if("string"!=typeof n||!n.length)throw new i.default('"storageName" is required');this.storageName=n,this.storageProvider=t}return(0,a.default)(e,[{key:"getItem",value:function(e){return this.getStorage()[e]}},{key:"setItem",value:function(e,t){return this.updateStorage(e,t)}},{key:"removeItem",value:function(e){return this.clearStorage(e)}},{key:"getStorage",value:function(){var e=this.storageProvider.getItem(this.storageName);e=e||"{}";try{return JSON.parse(e)}catch(e){throw new i.default("Unable to parse storage string: "+this.storageName)}}},{key:"setStorage",value:function(e){try{var t=e?JSON.stringify(e):"{}";this.storageProvider.setItem(this.storageName,t)}catch(e){throw new i.default("Unable to set storage: "+this.storageName)}}},{key:"clearStorage",value:function(e){if(e){var t=this.getStorage();delete t[e],this.setStorage(t)}else this.storageProvider.removeItem?this.storageProvider.removeItem(this.storageName):this.setStorage()}},{key:"updateStorage",value:function(e,t){var n=this.getStorage();n[e]=t,this.setStorage(n)}}]),e}();t.default=s,e.exports=t.default},2043:function(e,t,n){"use strict";var r=n(5318);t.ServiceManager=void 0;var o=r(n(319)),a=r(n(4575)),i=r(n(3913)),s=n(8437),u=n(5139),c=n(9426);function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.default)(this,e),this.sdk=t;var o=t.tokenManager.getOptions(),i=o.autoRenew,s=o.autoRemove,u=o.syncStorage;this.options=Object.assign({},e.defaultOptions,{autoRenew:i,autoRemove:s,syncStorage:u},r),this.started=!1,this.services=new Map,this.onLeaderDuplicate=this.onLeaderDuplicate.bind(this),this.onLeader=this.onLeader.bind(this),e.knownServices.forEach((function(e){var t=n.createService(e);t&&n.services.set(e,t)}))}return(0,i.default)(e,[{key:"onLeader",value:function(){this.started&&this.startServices()}},{key:"onLeaderDuplicate",value:function(){}},{key:"isLeader",value:function(){var e;return!!(null===(e=this.elector)||void 0===e?void 0:e.isLeader)}},{key:"hasLeader",value:function(){var e;return null===(e=this.elector)||void 0===e?void 0:e.hasLeader}},{key:"isLeaderRequired",value:function(){return(0,o.default)(this.services.values()).some((function(e){return e.requiresLeadership()}))}},{key:"start",value:function(){this.started&&this.stop(),this.isLeaderRequired()&&this.startElector(),this.startServices(),this.started=!0}},{key:"stop",value:function(){this.stopElector(),this.stopServices(),this.started=!1}},{key:"getService",value:function(e){return this.services.get(e)}},{key:"startServices",value:function(){var e,t=l(this.services.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;n.canStart()&&!n.isStarted()&&(!n.requiresLeadership()||this.isLeader())&&n.start()}}catch(e){t.e(e)}finally{t.f()}}},{key:"stopServices",value:function(){var e,t=l(this.services.values());try{for(t.s();!(e=t.n()).done;)e.value.stop()}catch(e){t.e(e)}finally{t.f()}}},{key:"startElector",value:function(){if(this.stopElector(),e.canUseLeaderElection()){if(!this.channel){var t=this.options.broadcastChannelName;this.channel=new s.BroadcastChannel(t)}this.elector||(this.elector=(0,s.createLeaderElection)(this.channel),this.elector.onduplicate=this.onLeaderDuplicate,this.elector.awaitLeadership().then(this.onLeader))}}},{key:"stopElector",value:function(){var e,t;this.elector&&(null===(e=this.elector)||void 0===e||e.die(),this.elector=void 0,null===(t=this.channel)||void 0===t||t.close(),this.channel=void 0)}},{key:"createService",value:function(e){var t,n=this.sdk.tokenManager;switch(e){case"autoRenew":t=new u.AutoRenewService(n,Object.assign({},this.options));break;case"syncStorage":t=new u.SyncStorageService(n,Object.assign({},this.options));break;default:throw new Error("Unknown service ".concat(e))}return t}}],[{key:"canUseLeaderElection",value:function(){return(0,c.isBrowser)()}}]),e}();t.ServiceManager=d,d.knownServices=["autoRenew","syncStorage"],d.defaultOptions={autoRenew:!0,autoRemove:!0,syncStorage:!0}},500:function(e,t,n){"use strict";var r=n(5318);t.StorageManager=void 0;var o=r(n(4575)),a=r(n(3913)),i=n(3754),s=r(n(472)),u=n(9426),c=n(8965),l=n(5705);function f(e){(0,u.isBrowser)()||e.storageProvider||e.storageProvider||(0,c.warn)("Memory storage can only support simple single user use case on server side, please provide custom storageProvider or storageKey if advanced scenarios need to be supported.")}var d=function(){function e(t,n,r){(0,o.default)(this,e),this.storageManagerOptions=t,this.cookieOptions=n,this.storageUtil=r}return(0,a.default)(e,[{key:"getOptionsForSection",value:function(e,t){return Object.assign({},this.storageManagerOptions[e],t)}},{key:"getStorage",value:function(e){if((e=Object.assign({},this.cookieOptions,e)).storageProvider)return e.storageProvider;var t=e,n=t.storageType,r=t.storageTypes;if("sessionStorage"===n&&(e.sessionCookie=!0),n&&r){var o=r.indexOf(n);o>=0&&(r=r.slice(o),n=void 0)}return n||(n=this.storageUtil.findStorageType(r)),this.storageUtil.getStorageByType(n,e)}},{key:"getTransactionStorage",value:function(e){f(e=this.getOptionsForSection("transaction",e));var t=this.getStorage(e),n=e.storageKey||i.TRANSACTION_STORAGE_NAME;return new s.default(t,n)}},{key:"getSharedTansactionStorage",value:function(e){f(e=this.getOptionsForSection("shared-transaction",e));var t=this.getStorage(e),n=e.storageKey||i.SHARED_TRANSACTION_STORAGE_NAME;return new s.default(t,n)}},{key:"getOriginalUriStorage",value:function(e){f(e=this.getOptionsForSection("original-uri",e));var t=this.getStorage(e),n=e.storageKey||i.ORIGINAL_URI_STORAGE_NAME;return new s.default(t,n)}},{key:"getIdxResponseStorage",value:function(e){var t;if((0,u.isBrowser)())try{t=this.storageUtil.getStorageByType("memory",e)}catch(e){(0,c.warn)("No response storage found, you may want to provide custom implementation for intermediate idx responses to optimize the network traffic")}else{var n=this.getTransactionStorage(e);n&&(t={getItem:function(e){var t=n.getStorage();return t&&t[e]?t[e]:null},setItem:function(e,t){var r=n.getStorage();if(!r)throw new l.AuthSdkError("Transaction has been cleared, failed to save idxState");r[e]=t,n.setStorage(r)},removeItem:function(e){var t=n.getStorage();t&&(delete t[e],n.setStorage(t))}})}return t?new s.default(t,i.IDX_RESPONSE_STORAGE_NAME):null}},{key:"getTokenStorage",value:function(e){f(e=this.getOptionsForSection("token",e));var t=this.getStorage(e),n=e.storageKey||i.TOKEN_STORAGE_NAME;return new s.default(t,n)}},{key:"getHttpCache",value:function(e){e=this.getOptionsForSection("cache",e);var t=this.getStorage(e),n=e.storageKey||i.CACHE_STORAGE_NAME;return new s.default(t,n)}},{key:"getLegacyPKCEStorage",value:function(e){e=this.getOptionsForSection("legacy-pkce",e);var t=this.getStorage(e),n=e.storageKey||i.PKCE_STORAGE_NAME;return new s.default(t,n)}},{key:"getLegacyOAuthParamsStorage",value:function(e){e=this.getOptionsForSection("legacy-oauth-params",e);var t=this.getStorage(e),n=e.storageKey||i.REDIRECT_OAUTH_PARAMS_NAME;return new s.default(t,n)}}]),e}();t.StorageManager=d},2231:function(e,t,n){"use strict";var r=n(5318);t.TokenManager=t.EVENT_ERROR=t.EVENT_REMOVED=t.EVENT_ADDED=t.EVENT_RENEWED=t.EVENT_EXPIRED=void 0;var o=r(n(7757)),a=r(n(8)),i=r(n(4575)),s=r(n(3913)),u=n(8965),c=n(5705),l=n(4736),f=n(9426),d=r(n(322)),h=n(858),p=n(3754),v=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))},y={autoRenew:!0,autoRemove:!0,syncStorage:!0,clearPendingRemoveTokens:!0,storage:void 0,expireEarlySeconds:30,storageKey:p.TOKEN_STORAGE_NAME,_storageEventDelay:0},g="expired";t.EVENT_EXPIRED=g;var m="renewed";t.EVENT_RENEWED=m;var b="added";t.EVENT_ADDED=b;var k="removed";t.EVENT_REMOVED=k;var w="error";t.EVENT_ERROR=w;var O=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((0,i.default)(this,e),this.sdk=t,this.emitter=t.emitter,!this.emitter)throw new c.AuthSdkError("Emitter should be initialized before TokenManager");n=Object.assign({},y,(0,u.removeNils)(n)),(0,f.isIE11OrLess)()&&(n._storageEventDelay=n._storageEventDelay||1e3),(0,f.isLocalhost)()||(n.expireEarlySeconds=y.expireEarlySeconds),this.options=n;var r=(0,u.removeNils)({storageKey:n.storageKey,secure:n.secure});"object"===(0,a.default)(n.storage)?r.storageProvider=n.storage:n.storage&&(r.storageType=n.storage),this.storage=t.storageManager.getTokenStorage(Object.assign(Object.assign({},r),{useSeparateCookies:!0})),this.clock=d.default.create(),this.state={expireTimeouts:{},renewPromise:null},this.on=this.emitter.on.bind(this.emitter),this.off=this.emitter.off.bind(this.emitter)}return(0,s.default)(e,[{key:"start",value:function(){this.options.clearPendingRemoveTokens&&this.clearPendingRemoveTokens(),this.setExpireEventTimeoutAll()}},{key:"stop",value:function(){this.clearExpireEventTimeoutAll()}},{key:"getOptions",value:function(){return(0,u.clone)(this.options)}},{key:"getExpireTime",value:function(e){var t=this.options.expireEarlySeconds||0;return e.expiresAt-t}},{key:"hasExpired",value:function(e){return this.getExpireTime(e)<=this.clock.now()}},{key:"emitExpired",value:function(e,t){this.emitter.emit(g,e,t)}},{key:"emitRenewed",value:function(e,t,n){this.emitter.emit(m,e,t,n)}},{key:"emitAdded",value:function(e,t){this.emitter.emit(b,e,t)}},{key:"emitRemoved",value:function(e,t){this.emitter.emit(k,e,t)}},{key:"emitError",value:function(e){this.emitter.emit(w,e)}},{key:"emitEventsForCrossTabsStorageUpdate",value:function(e,t){var n=this,r=this.getTokensFromStorageValue(t),o=this.getTokensFromStorageValue(e);Object.keys(o).forEach((function(e){var t=r[e],a=o[e];JSON.stringify(t)!==JSON.stringify(a)&&n.emitAdded(e,a)})),Object.keys(r).forEach((function(e){var t=r[e];o[e]||n.emitRemoved(e,t)}))}},{key:"clearExpireEventTimeout",value:function(e){clearTimeout(this.state.expireTimeouts[e]),delete this.state.expireTimeouts[e],this.state.renewPromise=null}},{key:"clearExpireEventTimeoutAll",value:function(){var e=this.state.expireTimeouts;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.clearExpireEventTimeout(t)}},{key:"setExpireEventTimeout",value:function(e,t){var n=this;if(!(0,h.isRefreshToken)(t)){var r=this.getExpireTime(t),o=1e3*Math.max(r-this.clock.now(),0);this.clearExpireEventTimeout(e);var a=setTimeout((function(){n.emitExpired(e,t)}),o);this.state.expireTimeouts[e]=a}}},{key:"setExpireEventTimeoutAll",value:function(){var e=this.storage.getStorage();for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];this.setExpireEventTimeout(t,n)}}},{key:"resetExpireEventTimeoutAll",value:function(){this.clearExpireEventTimeoutAll(),this.setExpireEventTimeoutAll()}},{key:"add",value:function(e,t){var n=this.storage.getStorage();(0,l.validateToken)(t),n[e]=t,this.storage.setStorage(n),this.emitAdded(e,t),this.setExpireEventTimeout(e,t)}},{key:"getSync",value:function(e){return this.storage.getStorage()[e]}},{key:"get",value:function(e){return v(this,void 0,void 0,o.default.mark((function t(){return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.getSync(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"getTokensSync",value:function(){var e={},t=this.storage.getStorage();return Object.keys(t).forEach((function(n){var r=t[n];(0,h.isAccessToken)(r)?e.accessToken=r:(0,h.isIDToken)(r)?e.idToken=r:(0,h.isRefreshToken)(r)&&(e.refreshToken=r)})),e}},{key:"getTokens",value:function(){return v(this,void 0,void 0,o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getTokensSync());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getStorageKeyByType",value:function(e){var t=this.storage.getStorage();return Object.keys(t).filter((function(n){var r=t[n];return(0,h.isAccessToken)(r)&&"accessToken"===e||(0,h.isIDToken)(r)&&"idToken"===e||(0,h.isRefreshToken)(r)&&"refreshToken"===e}))[0]}},{key:"getTokenType",value:function(e){if((0,h.isAccessToken)(e))return"accessToken";if((0,h.isIDToken)(e))return"idToken";if((0,h.isRefreshToken)(e))return"refreshToken";throw new c.AuthSdkError("Unknown token type")}},{key:"setTokens",value:function(e,t,n,r){var o=this,a=function(e,a){var i=o.getTokenType(a);"accessToken"===i?t&&t(e,a):"idToken"===i?n&&n(e,a):"refreshToken"===i&&r&&r(e,a)},i=function(e,t){o.emitAdded(e,t),o.setExpireEventTimeout(e,t),a(e,t)},s=function(e,t){o.clearExpireEventTimeout(e),o.emitRemoved(e,t),a(e,t)},u=["idToken","accessToken","refreshToken"],c=this.getTokensSync();u.forEach((function(t){var n=e[t];n&&(0,l.validateToken)(n,t)}));var f=u.reduce((function(t,n){var r=e[n];return r&&(t[o.getStorageKeyByType(n)||n]=r),t}),{});this.storage.setStorage(f),u.forEach((function(t){var n,r,u,l=e[t],f=c[t],d=o.getStorageKeyByType(t)||t;l&&f?(s(d,f),i(d,l),n=d,r=l,u=f,o.emitRenewed(n,r,u),o.clearExpireEventTimeout(n),o.setExpireEventTimeout(n,r),a(n,r)):l?i(d,l):f&&s(d,f)}))}},{key:"remove",value:function(e){this.clearExpireEventTimeout(e);var t=this.storage.getStorage(),n=t[e];delete t[e],this.storage.setStorage(t),this.emitRemoved(e,n)}},{key:"renewToken",value:function(e){var t;return v(this,void 0,void 0,o.default.mark((function n(){return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",null===(t=this.sdk.token)||void 0===t?void 0:t.renew(e));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"validateToken",value:function(e){return(0,l.validateToken)(e)}},{key:"renew",value:function(e){var t=this;if(this.state.renewPromise)return this.state.renewPromise;try{var n=this.getSync(e);if(!n)throw new c.AuthSdkError("The tokenManager has no token for the key: "+e)}catch(e){return Promise.reject(e)}return this.clearExpireEventTimeout(e),this.state.renewPromise=this.sdk.token.renewTokens().then((function(e){return t.setTokens(e),e[t.getTokenType(n)]})).catch((function(n){throw t.remove(e),n.tokenKey=e,t.emitError(n),n})).finally((function(){t.state.renewPromise=null})),this.state.renewPromise}},{key:"clear",value:function(){this.clearExpireEventTimeoutAll(),this.storage.clearStorage()}},{key:"clearPendingRemoveTokens",value:function(){var e=this,t=this.getTokensSync();Object.keys(t).forEach((function(n){t[n].pendingRemove&&e.remove(n)}))}},{key:"getTokensFromStorageValue",value:function(e){var t;try{t=JSON.parse(e)||{}}catch(e){t={}}return t}},{key:"updateRefreshToken",value:function(e){var t=this.getStorageKeyByType("refreshToken")||p.REFRESH_TOKEN_STORAGE_KEY,n=this.storage.getStorage();(0,l.validateToken)(e),n[t]=e,this.storage.setStorage(n)}},{key:"addPendingRemoveFlags",value:function(){var e=this.getTokensSync();Object.keys(e).forEach((function(t){e[t].pendingRemove=!0})),this.setTokens(e)}}]),e}();t.TokenManager=O},1796:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(3913)),i=n(5705),s=n(3754),u=n(858),c=n(3675),l=n(8965),f=n(2051),d=function(){function e(t){(0,o.default)(this,e),this.storageManager=t.storageManager,this.legacyWidgetSupport=!1!==t.legacyWidgetSupport,this.saveNonceCookie=!1!==t.saveNonceCookie,this.saveStateCookie=!1!==t.saveStateCookie,this.saveParamsCookie=!1!==t.saveParamsCookie,this.enableSharedStorage=!1!==t.enableSharedStorage,this.saveLastResponse=!1!==t.saveLastResponse,this.options=t}return(0,a.default)(e,[{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.storageManager.getTransactionStorage(),n=t.getStorage();if(t.clearStorage(),this.clearIdxResponse(),this.enableSharedStorage&&!1!==e.clearSharedStorage){var r=e.state||(null==n?void 0:n.state);r&&(0,f.clearTransactionFromSharedStorage)(this.storageManager,r)}this.legacyWidgetSupport&&(e.oauth&&this.clearLegacyOAuthParams(),e.pkce&&this.clearLegacyPKCE())}},{key:"save",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.storageManager.getTransactionStorage(),r=n.getStorage();if((0,u.isTransactionMeta)(r)&&!t.muteWarning&&(0,l.warn)("a saved auth transaction exists in storage. This may indicate another auth flow is already in progress."),n.setStorage(e),this.enableSharedStorage&&e.state&&(0,f.saveTransactionToSharedStorage)(this.storageManager,e.state,e),t.oauth&&(this.saveNonceCookie||this.saveStateCookie||this.saveParamsCookie)){var o=this.storageManager.getStorage({storageType:"cookie"});if(this.saveParamsCookie){var a=e.responseType,i=e.state,c=e.nonce,d=e.scopes,h=e.clientId,p=e.urls,v=e.ignoreSignature,y={responseType:a,state:i,nonce:c,scopes:d,clientId:h,urls:p,ignoreSignature:v};o.setItem(s.REDIRECT_OAUTH_PARAMS_NAME,JSON.stringify(y),null)}this.saveNonceCookie&&e.nonce&&o.setItem(s.REDIRECT_NONCE_COOKIE_NAME,e.nonce,null),this.saveStateCookie&&e.state&&o.setItem(s.REDIRECT_STATE_COOKIE_NAME,e.state,null)}}},{key:"exists",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var t=this.load(e);return!!t}catch(e){return!1}}},{key:"load",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.enableSharedStorage&&t.state&&((0,f.pruneSharedStorage)(this.storageManager),e=(0,f.loadTransactionFromSharedStorage)(this.storageManager,t.state),(0,u.isTransactionMeta)(e)))return e;var n=this.storageManager.getTransactionStorage();if(e=n.getStorage(),(0,u.isTransactionMeta)(e))return e;if(!this.legacyWidgetSupport)return null;if(t.oauth)try{var r=this.loadLegacyOAuthParams();Object.assign(e,r)}finally{this.clearLegacyOAuthParams()}if(t.pkce)try{var o=this.loadLegacyPKCE();Object.assign(e,o)}finally{this.clearLegacyPKCE()}return(0,u.isTransactionMeta)(e)?e:null}},{key:"clearLegacyPKCE",value:function(){this.storageManager.storageUtil.testStorageType("localStorage")&&this.storageManager.getLegacyPKCEStorage({storageType:"localStorage"}).clearStorage(),this.storageManager.storageUtil.testStorageType("sessionStorage")&&this.storageManager.getLegacyPKCEStorage({storageType:"sessionStorage"}).clearStorage()}},{key:"loadLegacyPKCE",value:function(){var e;if(this.storageManager.storageUtil.testStorageType("localStorage")&&(e=this.storageManager.getLegacyPKCEStorage({storageType:"localStorage"}).getStorage())&&e.codeVerifier)return e;if(this.storageManager.storageUtil.testStorageType("sessionStorage")&&(e=this.storageManager.getLegacyPKCEStorage({storageType:"sessionStorage"}).getStorage())&&e.codeVerifier)return e;throw new i.AuthSdkError("Could not load PKCE codeVerifier from storage. This may indicate the auth flow has already completed or multiple auth flows are executing concurrently.",void 0)}},{key:"clearLegacyOAuthParams",value:function(){this.storageManager.storageUtil.testStorageType("sessionStorage")&&this.storageManager.getLegacyOAuthParamsStorage({storageType:"sessionStorage"}).clearStorage(),this.storageManager.storageUtil.testStorageType("cookie")&&this.storageManager.getLegacyOAuthParamsStorage({storageType:"cookie"}).clearStorage()}},{key:"loadLegacyOAuthParams",value:function(){var e;if(this.storageManager.storageUtil.testStorageType("sessionStorage")&&(e=this.storageManager.getLegacyOAuthParamsStorage({storageType:"sessionStorage"}).getStorage()),(0,u.isOAuthTransactionMeta)(e))return e;if(this.storageManager.storageUtil.testStorageType("cookie")&&(e=this.storageManager.getLegacyOAuthParamsStorage({storageType:"cookie"}).getStorage()),(0,u.isOAuthTransactionMeta)(e))return e;throw new i.AuthSdkError("Unable to retrieve OAuth redirect params from storage")}},{key:"saveIdxResponse",value:function(e){var t=e.rawIdxResponse,n=e.requestDidSucceed;if(this.saveLastResponse){var r=this.storageManager.getIdxResponseStorage();r&&r.setStorage({rawIdxResponse:t,requestDidSucceed:n})}}},{key:"loadIdxResponse",value:function(){if(!this.saveLastResponse)return null;var e=this.storageManager.getIdxResponseStorage();if(!e)return null;var t=e.getStorage();return t&&(0,c.isRawIdxResponse)(t.rawIdxResponse)?t:null}},{key:"clearIdxResponse",value:function(){if(this.saveLastResponse){var e=this.storageManager.getIdxResponseStorage();null==e||e.clearStorage()}}}]),e}();t.default=d,e.exports=t.default},7501:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(646)),a=r(n(7948)),i=n(8965),s={getHttpCache:function(){return null},getPKCEStorage:function(){return null},browserHasLocalStorage:function(){try{var e=this.getLocalStorage();return this.testStorage(e)}catch(e){return!1}},browserHasSessionStorage:function(){try{var e=this.getSessionStorage();return this.testStorage(e)}catch(e){return!1}},testStorageType:function(e){var t=!1;switch(e){case"sessionStorage":t=this.browserHasSessionStorage();break;case"localStorage":t=this.browserHasLocalStorage();break;case"cookie":case"memory":t=!0;break;default:t=!1}return t},getStorageByType:function(e,t){var n;switch(e){case"sessionStorage":n=this.getSessionStorage();break;case"localStorage":n=this.getLocalStorage();break;case"cookie":n=this.getCookieStorage(t);break;case"memory":n=this.getInMemoryStorage();break;default:throw new a.default("Unrecognized storage option: ".concat(e))}return n},findStorageType:function(e){var t,n;return t=(e=e.slice()).shift(),(n=e.length?e[0]:null)?this.testStorageType(t)?t:((0,i.warn)("This browser doesn't support ".concat(t,". Switching to ").concat(n,".")),this.findStorageType(e)):t},getLocalStorage:function(){return localStorage},getSessionStorage:function(){return sessionStorage},getCookieStorage:function(e){var t=this,n=e.secure,r=e.sameSite,o=e.sessionCookie;if(void 0===n||void 0===r)throw new a.default('getCookieStorage: "secure" and "sameSite" options must be provided');var i={getItem:this.storage.get,setItem:function(e,a){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"2200-01-01T00:00:00.000Z";i=o?null:i,t.storage.set(e,a,i,{secure:n,sameSite:r})},removeItem:function(e){t.storage.delete(e)}};return e.useSeparateCookies?{getItem:function(e){var t=i.getItem(),n={};return Object.keys(t).forEach((function(r){0===r.indexOf(e)&&(n[r.replace("".concat(e,"_"),"")]=JSON.parse(t[r]))})),JSON.stringify(n)},setItem:function(e,t){var n=JSON.parse(this.getItem(e));t=JSON.parse(t),Object.keys(t).forEach((function(r){var o=e+"_"+r,a=JSON.stringify(t[r]);i.setItem(o,a),delete n[r]})),Object.keys(n).forEach((function(t){i.removeItem(e+"_"+t)}))},removeItem:function(e){var t=JSON.parse(this.getItem(e));Object.keys(t).forEach((function(t){i.removeItem(e+"_"+t)}))}}:i},inMemoryStore:{},getInMemoryStorage:function(){var e=this;return{getItem:function(t){return e.inMemoryStore[t]},setItem:function(t,n){e.inMemoryStore[t]=n}}},testStorage:function(e){var t="okta-test-storage";try{return e.setItem(t,t),e.removeItem(t),!0}catch(e){return!1}},storage:{set:function(e,t,n,r){var i=r.sameSite,s=r.secure;if(void 0===s||void 0===i)throw new a.default('storage.set: "secure" and "sameSite" options must be provided');var u={path:r.path||"/",secure:s,sameSite:i};return Date.parse(n)&&(u.expires=new Date(n)),o.default.set(e,t,u),this.get(e)},get:function(e){return arguments.length?o.default.get(e):o.default.get()},delete:function(e){return o.default.remove(e,{path:"/"})}}},u=s;t.default=u,e.exports=t.default},792:function(e,t,n){"use strict";t.default=function(e,t){return t=t||{},(0,o.isFingerprintSupported)()?new Promise((function(o,u){(i=document.createElement("iframe")).style.display="none",s=function(t){if(t&&t.data&&t.origin===e.getIssuerOrigin()){try{var n=JSON.parse(t.data)}catch(e){return}if(n)return"FingerprintAvailable"===n.type?o(n.fingerprint):void("FingerprintServiceReady"===n.type&&t.source.postMessage(JSON.stringify({type:"GetFingerprint"}),t.origin))}},(0,a.addListener)(window,"message",s),i.src=e.getIssuerOrigin()+"/auth/services/devicefingerprint",document.body.appendChild(i),n=setTimeout((function(){u(new r.AuthSdkError("Fingerprinting timed out"))}),(null==t?void 0:t.timeout)||15e3)})).finally((function(){clearTimeout(n),(0,a.removeListener)(window,"message",s),document.body.contains(i)&&i.parentElement.removeChild(i)})):Promise.reject(new r.AuthSdkError("Fingerprinting is not supported on this device"));var n,i,s};var r=n(5705),o=n(9426),a=n(6496);e.exports=t.default},6862:function(e,t,n){"use strict";var r=n(5318);t.assertValidConfig=function(e){var t=(e=e||{}).scopes;if(t&&!Array.isArray(t))throw new o.default('scopes must be a array of strings. Required usage: new OktaAuth({scopes: ["openid", "email"]})');var n=e.issuer;if(!n)throw new o.default('No issuer passed to constructor. Required usage: new OktaAuth({issuer: "https://{yourOktaDomain}.com/oauth2/{authServerId}"})');if(!new RegExp("^http?s?://.+").test(n))throw new o.default('Issuer must be a valid URL. Required usage: new OktaAuth({issuer: "https://{yourOktaDomain}.com/oauth2/{authServerId}"})');if(-1!==n.indexOf("-admin."))throw new o.default('Issuer URL passed to constructor contains "-admin" in subdomain. Required usage: new OktaAuth({issuer: "https://{yourOktaDomain}.com})')};var o=r(n(7948))},322:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(3913)),i=function(){function e(t){(0,o.default)(this,e),this.localOffset=parseInt(t||0)}return(0,a.default)(e,[{key:"now",value:function(){return(Date.now()+this.localOffset)/1e3}}],[{key:"create",value:function(){return new e(0)}}]),e}();t.default=i,e.exports=t.default},3754:function(e,t){"use strict";t.IDX_API_VERSION=t.DEFAULT_CODE_CHALLENGE_METHOD=t.MAX_VERIFIER_LENGTH=t.MIN_VERIFIER_LENGTH=t.REFERRER_PATH_STORAGE_KEY=t.REFRESH_TOKEN_STORAGE_KEY=t.ID_TOKEN_STORAGE_KEY=t.ACCESS_TOKEN_STORAGE_KEY=t.IDX_RESPONSE_STORAGE_NAME=t.ORIGINAL_URI_STORAGE_NAME=t.SHARED_TRANSACTION_STORAGE_NAME=t.TRANSACTION_STORAGE_NAME=t.PKCE_STORAGE_NAME=t.CACHE_STORAGE_NAME=t.TOKEN_STORAGE_NAME=t.REDIRECT_NONCE_COOKIE_NAME=t.REDIRECT_STATE_COOKIE_NAME=t.REDIRECT_OAUTH_PARAMS_NAME=t.DEFAULT_CACHE_DURATION=t.DEFAULT_MAX_CLOCK_SKEW=t.DEFAULT_POLLING_DELAY=t.STATE_TOKEN_KEY_NAME=void 0,t.STATE_TOKEN_KEY_NAME="oktaStateToken",t.DEFAULT_POLLING_DELAY=500,t.DEFAULT_MAX_CLOCK_SKEW=300,t.DEFAULT_CACHE_DURATION=86400,t.REDIRECT_OAUTH_PARAMS_NAME="okta-oauth-redirect-params",t.REDIRECT_STATE_COOKIE_NAME="okta-oauth-state",t.REDIRECT_NONCE_COOKIE_NAME="okta-oauth-nonce",t.TOKEN_STORAGE_NAME="okta-token-storage",t.CACHE_STORAGE_NAME="okta-cache-storage",t.PKCE_STORAGE_NAME="okta-pkce-storage",t.TRANSACTION_STORAGE_NAME="okta-transaction-storage",t.SHARED_TRANSACTION_STORAGE_NAME="okta-shared-transaction-storage",t.ORIGINAL_URI_STORAGE_NAME="okta-original-uri-storage",t.IDX_RESPONSE_STORAGE_NAME="okta-idx-response-storage",t.ACCESS_TOKEN_STORAGE_KEY="accessToken",t.ID_TOKEN_STORAGE_KEY="idToken",t.REFRESH_TOKEN_STORAGE_KEY="refreshToken",t.REFERRER_PATH_STORAGE_KEY="referrerPath",t.MIN_VERIFIER_LENGTH=43,t.MAX_VERIFIER_LENGTH=128,t.DEFAULT_CODE_CHALLENGE_METHOD="S256",t.IDX_API_VERSION="1.0.0"},5358:function(e,t,n){"use strict";t.stringToBase64Url=function(e){return a((0,o.btoa)(e))},t.base64ToBase64Url=a,t.base64UrlToBase64=i,t.base64UrlToString=function(e){var t=i(e);switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new r.AuthSdkError("Not a valid Base64Url")}var n=(0,o.atob)(t);try{return decodeURIComponent(escape(n))}catch(e){return n}},t.stringToBuffer=function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t},t.base64UrlDecode=s,t.base64UrlToBuffer=function(e){return Uint8Array.from(s(e),(function(e){return e.charCodeAt(0)}))},t.bufferToBase64Url=function(e){return(0,o.btoa)(new Uint8Array(e).reduce((function(e,t){return e+String.fromCharCode(t)}),""))};var r=n(5705),o=n(5912);function a(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function i(e){return e.replace(/-/g,"+").replace(/_/g,"/")}function s(e){return(0,o.atob)(i(e))}},6661:function(e,t){"use strict";t.webcrypto=t.btoa=t.atob=void 0,t.atob=function(e){return atob(e)},t.btoa=function(e){return btoa(e)};var n="undefined"==typeof crypto?null:crypto;t.webcrypto=n},5637:function(e,t,n){"use strict";var r=n(5358);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(5798);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(1138);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(5912);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}))},5798:function(e,t,n){"use strict";t.getOidcHash=function(e){var t=(new TextEncoder).encode(e);return o.webcrypto.subtle.digest("SHA-256",t).then((function(e){var t=new Uint8Array(e).slice(0,16),n=String.fromCharCode.apply(null,t);return(0,r.stringToBase64Url)(n)}))};var r=n(5358),o=n(5912)},1138:function(e,t,n){"use strict";t.verifyToken=function(e,t){t=(0,r.clone)(t);var n={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};return delete t.use,a.webcrypto.subtle.importKey("jwk",t,n,!0,["verify"]).then((function(t){var r=e.split("."),i=(0,o.stringToBuffer)(r[0]+"."+r[1]),s=(0,o.base64UrlDecode)(r[2]),u=(0,o.stringToBuffer)(s);return a.webcrypto.subtle.verify(n,t,u,i)}))};var r=n(8965),o=n(5358),a=n(5912)},2814:function(e,t,n){"use strict";t.getAssertion=t.getAttestation=t.buildCredentialRequestOptions=t.buildCredentialCreationOptions=void 0;var r=n(5358),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];return e.forEach((function(e){"webauthn"===e.key&&t.push({type:"public-key",id:(0,r.base64UrlToBuffer)(e.credentialId)})})),t};t.buildCredentialCreationOptions=function(e,t){return{publicKey:{rp:e.rp,user:{id:(0,r.base64UrlToBuffer)(e.user.id),name:e.user.name,displayName:e.user.displayName},challenge:(0,r.base64UrlToBuffer)(e.challenge),pubKeyCredParams:e.pubKeyCredParams,attestation:e.attestation,authenticatorSelection:e.authenticatorSelection,excludeCredentials:o(t)}}},t.buildCredentialRequestOptions=function(e,t){return{publicKey:{challenge:(0,r.base64UrlToBuffer)(e.challenge),userVerification:e.userVerification,allowCredentials:o(t)}}},t.getAttestation=function(e){var t=e.response;return{id:e.id,clientData:(0,r.bufferToBase64Url)(t.clientDataJSON),attestation:(0,r.bufferToBase64Url)(t.attestationObject)}},t.getAssertion=function(e){var t=e.response;return{id:e.id,clientData:(0,r.bufferToBase64Url)(t.clientDataJSON),authenticatorData:(0,r.bufferToBase64Url)(t.authenticatorData),signatureData:(0,r.bufferToBase64Url)(t.signature)}}},5912:function(e,t,n){"use strict";var r=n(6661);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}))},1226:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(2205)),i=r(n(8585)),s=r(n(9754));var u=function(e){(0,a.default)(u,e);var t,n,r=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.default)(this,e)});function u(e,t){var n;(0,o.default)(this,u);var a=e.errorSummary;return(n=r.call(this,a)).name="AuthApiError",n.errorSummary=e.errorSummary,n.errorCode=e.errorCode,n.errorLink=e.errorLink,n.errorId=e.errorId,n.errorCauses=e.errorCauses,t&&(n.xhr=t),n}return u}(r(n(5020)).default);t.default=u,e.exports=t.default},3820:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(2205)),i=r(n(8585)),s=r(n(9754));var u=function(e){(0,a.default)(u,e);var t,n,r=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.default)(this,e)});function u(){return(0,o.default)(this,u),r.call(this,"The poll was stopped by the sdk")}return u}(r(n(5020)).default);t.default=u,e.exports=t.default},7948:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(2205)),i=r(n(8585)),s=r(n(9754));var u=function(e){(0,a.default)(u,e);var t,n,r=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.default)(this,e)});function u(e,t){var n;return(0,o.default)(this,u),(n=r.call(this,e)).name="AuthSdkError",n.errorCode="INTERNAL",n.errorSummary=e,n.errorLink="INTERNAL",n.errorId="INTERNAL",n.errorCauses=[],t&&(n.xhr=t),n}return u}(r(n(5020)).default);t.default=u,e.exports=t.default},5020:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(1506)),i=r(n(2205)),s=r(n(8585)),u=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function c(e){var t;return(0,o.default)(this,c),t=r.call(this,e),Object.setPrototypeOf((0,a.default)(t),(this instanceof c?this.constructor:void 0).prototype),t}return c}((0,r(n(5957)).default)(Error));t.default=c,e.exports=t.default},8101:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(2205)),i=r(n(8585)),s=r(n(9754));var u=function(e){(0,a.default)(u,e);var t,n,r=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.default)(this,e)});function u(e,t){var n;return(0,o.default)(this,u),(n=r.call(this,t)).name="OAuthError",n.errorCode=e,n.errorSummary=t,n}return u}(r(n(5020)).default);t.default=u,e.exports=t.default},5705:function(e,t,n){"use strict";var r=n(5318);t.isAuthApiError=function(e){return e instanceof o.default},Object.defineProperty(t,"AuthApiError",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"AuthPollStopError",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"AuthSdkError",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"OAuthError",{enumerable:!0,get:function(){return s.default}});var o=r(n(1226)),a=r(n(3820)),i=r(n(7948)),s=r(n(8101))},9426:function(e,t,n){"use strict";t.isBrowser=a,t.isIE11OrLess=function(){if(!a())return!1;var e=document.documentMode;return!!e&&e<=11},t.getUserAgent=i,t.isFingerprintSupported=function(){var e=i();return e&&!o.test(e)},t.isPopupPostMessageSupported=function(){if(!a())return!1;var e=document.documentMode,t=e&&e<10;return void 0!==window.postMessage&&!t},t.isTokenVerifySupported=s,t.hasTextEncoder=u,t.isPKCESupported=function(){return s()&&u()},t.isHTTPS=function(){return!!a()&&"https:"===window.location.protocol},t.isLocalhost=function(){return a()&&"localhost"===window.location.hostname};var r=n(5637),o=/windows phone|iemobile|wpdesktop/i;function a(){return"undefined"!=typeof document&&"undefined"!=typeof window}function i(){return navigator.userAgent}function s(){return void 0!==r.webcrypto&&null!==r.webcrypto&&void 0!==r.webcrypto.subtle&&"undefined"!=typeof Uint8Array}function u(){return"undefined"!=typeof TextEncoder}},4888:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(8)),a=r(n(4098));function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.default=function(e,t,r){var s=r.data,u=r.headers||{};"application/json"===(u["Content-Type"]||u["content-type"]||"")&&s&&"string"!=typeof s&&(s=JSON.stringify(s));var c=(n.g.fetch||a.default)(t,{method:e,headers:r.headers,body:s,credentials:r.withCredentials?"include":"omit"});return c.finally||(c=Promise.resolve(c)),c.then((function(e){var t=!e.ok,n=e.status;return function(e){return e.headers.get("Content-Type")&&e.headers.get("Content-Type").toLowerCase().indexOf("application/json")>=0?e.json().catch((function(e){return{error:e,errorSummary:"Could not parse server response"}})):e.text()}(e).then((function(t){return function(e,t,n){var r,a="object"===(0,o.default)(t),s={},u=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}(n.headers.entries());try{for(u.s();!(r=u.n()).done;){var c=r.value;s[c[0]]=c[1]}}catch(e){u.e(e)}finally{u.f()}var l={responseText:a?JSON.stringify(t):t,status:e,headers:s};return a&&(l.responseType="json",l.responseJSON=t),l}(n,t,e)})).then((function(e){var n;if(t||(null===(n=e.responseJSON)||void 0===n?void 0:n.error))throw e;return e}))}))},e.exports=t.default},9033:function(e,t){"use strict";t.setRequestHeader=function(e,t,n){e.options.headers=e.options.headers||{},e.options.headers[t]=n}},2924:function(e,t,n){"use strict";var r=n(9033);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(4011);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},4011:function(e,t,n){"use strict";var r=n(5318);t.httpRequest=u,t.get=function(e,t,n){var r={url:t=(0,a.isAbsoluteUrl)(t)?t:e.getIssuerOrigin()+t,method:"GET"};return Object.assign(r,n),u(e,r)},t.post=function(e,t,n,r){var o={url:t=(0,a.isAbsoluteUrl)(t)?t:e.getIssuerOrigin()+t,method:"POST",args:n,saveAuthnState:!0};return Object.assign(o,r),u(e,o)};var o=r(n(8)),a=n(8965),i=r(n(1226)),s=n(3754);function u(e,t){var n=(t=t||{}).url,r=t.method,u=t.args,c=t.saveAuthnState,l=t.accessToken,f=!0===t.withCredentials,d=e.options.storageUtil.storage,h=e.storageManager.getHttpCache(e.options.cookies);if(t.cacheResponse){var p=h.getStorage()[n];if(p&&Date.now()/1e3<p.expiresAt)return Promise.resolve(p.response)}var v=e._oktaUserAgent.getHttpHeader(),y=Object.assign({Accept:"application/json","Content-Type":"application/json"},v);Object.assign(y,e.options.headers,t.headers),y=(0,a.removeNils)(y),l&&(0,a.isString)(l)&&(y.Authorization="Bearer "+l);var g,m,b={headers:y,data:u||void 0,withCredentials:f};return e.options.httpRequestClient(r,n,b).then((function(r){return(m=r.responseText)&&(0,a.isString)(m)&&(m=JSON.parse(m))&&"object"===(0,o.default)(m)&&!m.headers&&(m.headers=r.headers),c&&(m.stateToken||d.delete(s.STATE_TOKEN_KEY_NAME)),m&&m.stateToken&&m.expiresAt&&d.set(s.STATE_TOKEN_KEY_NAME,m.stateToken,m.expiresAt,e.options.cookies),m&&t.cacheResponse&&h.updateStorage(n,{expiresAt:Math.floor(Date.now()/1e3)+s.DEFAULT_CACHE_DURATION,response:m}),m})).catch((function(t){var n=t.responseText||{};if((0,a.isString)(n))try{n=JSON.parse(n)}catch(e){n={errorSummary:"Unknown error"}}throw t.status>=500&&(n.errorSummary="Unknown error"),e.options.transformErrorXHR&&(t=e.options.transformErrorXHR((0,a.clone)(t))),"E0000011"===(g=new i.default(n,t)).errorCode&&d.delete(s.STATE_TOKEN_KEY_NAME),g}))}},786:function(e,t,n){"use strict";var r=n(5318);t.authenticate=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(this,void 0,void 0,o.default.mark((function n(){return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.password&&!t.authenticator&&(t.authenticator=a.AuthenticatorKey.OKTA_PASSWORD),n.abrupt("return",(0,i.run)(e,Object.assign(Object.assign({},t),{flow:"authenticate"})));case 2:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(858),i=n(8710),s=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}},373:function(e,t,n){"use strict";var r=n(5318);t.Authenticator=void 0;var o=r(n(4575));t.Authenticator=function e(t){(0,o.default)(this,e),this.meta=t}},6179:function(e,t,n){"use strict";var r=n(5318);t.OktaPassword=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),s=r(n(8585)),u=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canVerify",value:function(e){return!(!e.credentials&&!e.password)}},{key:"mapCredentials",value:function(e){var t=e.credentials,n=e.password;if(t||n)return t||{passcode:n}}},{key:"getInputs",value:function(e){var t;return Object.assign(Object.assign({},null===(t=e.form)||void 0===t?void 0:t.value[0]),{name:"password",type:"string",required:e.required})}}]),c}(n(373).Authenticator);t.OktaPassword=c},6741:function(e,t,n){"use strict";var r=n(5318);t.OktaVerifyTotp=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),s=r(n(8585)),u=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"mapCredentials",value:function(e){var t=e.verificationCode;if(t)return{totp:t}}}]),c}(n(8211).VerificationCodeAuthenticator);t.OktaVerifyTotp=c},3494:function(e,t,n){"use strict";var r=n(5318);t.SecurityQuestionEnrollment=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),s=r(n(8585)),u=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canVerify",value:function(e){var t=e.credentials;if(t&&t.questionKey&&t.answer)return!0;var n=e.questionKey,r=e.question,o=e.answer;return!(!n||!o)||!(!r||!o)}},{key:"mapCredentials",value:function(e){var t=e.questionKey,n=e.question,r=e.answer;if(t||n||r)return{questionKey:n?"custom":t,question:n,answer:r}}},{key:"getInputs",value:function(){return[{name:"questionKey",type:"string",required:!0},{name:"question",type:"string",label:"Create a security question"},{name:"answer",type:"string",label:"Answer",required:!0}]}}]),c}(n(373).Authenticator);t.SecurityQuestionEnrollment=c},3804:function(e,t,n){"use strict";var r=n(5318);t.SecurityQuestionVerification=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),s=r(n(8585)),u=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canVerify",value:function(e){return!!e.answer}},{key:"mapCredentials",value:function(e){var t=e.answer;if(t)return{questionKey:this.meta.contextualData.enrolledQuestion.questionKey,answer:t}}},{key:"getInputs",value:function(){return[{name:"answer",type:"string",label:"Answer",required:!0}]}}]),c}(n(373).Authenticator);t.SecurityQuestionVerification=c},8211:function(e,t,n){"use strict";var r=n(5318);t.VerificationCodeAuthenticator=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),s=r(n(8585)),u=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canVerify",value:function(e){return!!(e.credentials||e.verificationCode||e.otp)}},{key:"mapCredentials",value:function(e){var t=e.credentials,n=e.verificationCode,r=e.otp;if(t||n||r)return t||{passcode:n||r}}},{key:"getInputs",value:function(e){var t;return Object.assign(Object.assign({},null===(t=e.form)||void 0===t?void 0:t.value[0]),{name:"verificationCode",type:"string",required:e.required})}}]),c}(n(373).Authenticator);t.VerificationCodeAuthenticator=c},6663:function(e,t,n){"use strict";var r=n(5318);t.WebauthnEnrollment=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),s=r(n(8585)),u=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canVerify",value:function(e){var t=e.clientData,n=e.attestation;return!(!t||!n)}},{key:"mapCredentials",value:function(e){var t=e.clientData,n=e.attestation;if(t||n)return{clientData:t,attestation:n}}},{key:"getInputs",value:function(){return[{name:"clientData",type:"string",required:!0,visible:!1,label:"Client Data"},{name:"attestation",type:"string",required:!0,visible:!1,label:"Attestation"}]}}]),c}(n(373).Authenticator);t.WebauthnEnrollment=c},563:function(e,t,n){"use strict";var r=n(5318);t.WebauthnVerification=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),s=r(n(8585)),u=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canVerify",value:function(e){var t=e.clientData,n=e.authenticatorData,r=e.signatureData;return!!(t&&n&&r)}},{key:"mapCredentials",value:function(e){var t=e.authenticatorData,n=e.clientData,r=e.signatureData;if(t||n||r)return{authenticatorData:t,clientData:n,signatureData:r}}},{key:"getInputs",value:function(){return[{name:"authenticatorData",type:"string",label:"Authenticator Data",required:!0,visible:!1},{name:"clientData",type:"string",label:"Client Data",required:!0,visible:!1},{name:"signatureData",type:"string",label:"Signature Data",required:!0,visible:!1}]}}]),c}(n(373).Authenticator);t.WebauthnVerification=c},8523:function(e,t,n){"use strict";t.getAuthenticator=function(e){var t,n,f=e.relatesTo,d=(null==f?void 0:f.value)||{};switch(d.key){case l.AuthenticatorKey.OKTA_PASSWORD:return new a.OktaPassword(d);case l.AuthenticatorKey.SECURITY_QUESTION:return(null===(t=d.contextualData)||void 0===t?void 0:t.enrolledQuestion)?new s.SecurityQuestionVerification(d):new i.SecurityQuestionEnrollment(d);case l.AuthenticatorKey.OKTA_VERIFY:return new r.OktaVerifyTotp(d);case l.AuthenticatorKey.WEBAUTHN:return(null===(n=d.contextualData)||void 0===n?void 0:n.challengeData)?new c.WebauthnVerification(d):new u.WebauthnEnrollment(d);default:return new o.VerificationCodeAuthenticator(d)}};var r=n(6741),o=n(8211),a=n(6179),i=n(3494),s=n(3804),u=n(6663),c=n(563),l=n(6473)},2756:function(e,t,n){"use strict";var r=n(8523);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(373);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(8211);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(6179);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=n(3494);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=n(3804);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=n(6663);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=n(563);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}))},1825:function(e,t,n){"use strict";t.formatAuthenticator=function(e){var t;if((0,r.isAuthenticator)(e))t=e;else{if("string"!=typeof e)throw new Error("Invalid format for authenticator");t={key:e}}return t},t.compareAuthenticators=function(e,t){return!(!e||!t)&&(e.id&&t.id?e.id===t.id:!(!e.key||!t.key)&&e.key===t.key)},t.findMatchedOption=function(e,t){var n,r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}(e);try{var i=function(){var e=r.value;if(n=t.find((function(t){return t.relatesTo.key===e.key})))return"break"};for(a.s();!(r=a.n()).done&&"break"!==i(););}catch(e){a.e(e)}finally{a.f()}return n};var r=n(6473);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},1208:function(e,t,n){"use strict";var r=n(5318);t.cancel=function(e,t){return s(this,void 0,void 0,o.default.mark((function n(){var r,s;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.transactionManager.load(),s=(0,i.getFlowSpecification)(e,r.flow),n.abrupt("return",(0,a.run)(e,Object.assign(Object.assign(Object.assign({},t),s),{actions:["cancel"]})));case 3:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(8710),i=n(4270),s=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}},7169:function(e,t,n){"use strict";var r=n(5318);t.isEmailVerifyCallbackError=function(e){return"EmailVerifyCallbackError"===e.name},t.isEmailVerifyCallback=h,t.parseEmailVerifyCallback=p,t.handleEmailVerifyCallback=function(e,t){return f(this,void 0,void 0,o.default.mark((function n(){var r,a,i;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!h(t)){n.next=9;break}if(r=p(t),a=r.state,i=r.otp,!e.idx.canProceed({state:a})){n.next=8;break}return n.next=5,e.idx.proceed({state:a,otp:i});case 5:return n.abrupt("return",n.sent);case 8:throw new d(a,i);case 9:case"end":return n.stop()}}),n)})))},t.EmailVerifyCallbackError=void 0;var o=r(n(7757)),a=r(n(4575)),i=r(n(2205)),s=r(n(8585)),u=r(n(9754)),c=r(n(5020)),l=n(7724);var f=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))},d=function(e){(0,i.default)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function o(e,t){var n;return(0,a.default)(this,o),(n=r.call(this,"Enter the OTP code in the originating client: ".concat(t))).name="EmailVerifyCallbackError",n.state=e,n.otp=t,n}return o}(c.default);function h(e){return/(otp=)/i.test(e)&&/(state=)/i.test(e)}function p(e){return(0,l.urlParamsToObject)(e)}t.EmailVerifyCallbackError=d},7713:function(e,t,n){"use strict";t.AccountUnlockFlow=void 0;var r=n(6749),o={identify:r.Identify,"select-authenticator-unlock-account":r.SelectAuthenticatorUnlockAccount,"select-authenticator-authenticate":r.SelectAuthenticatorAuthenticate,"challenge-authenticator":r.ChallengeAuthenticator,"challenge-poll":r.ChallengePoll,"authenticator-verification-data":r.AuthenticatorVerificationData};t.AccountUnlockFlow=o},8962:function(e,t,n){"use strict";t.AuthenticationFlow=void 0;var r=n(6749),o={identify:r.Identify,"select-authenticator-authenticate":r.SelectAuthenticatorAuthenticate,"select-authenticator-enroll":r.SelectAuthenticatorEnroll,"authenticator-enrollment-data":r.AuthenticatorEnrollmentData,"authenticator-verification-data":r.AuthenticatorVerificationData,"enroll-authenticator":r.EnrollAuthenticator,"challenge-authenticator":r.ChallengeAuthenticator,"challenge-poll":r.ChallengePoll,"reenroll-authenticator":r.ReEnrollAuthenticator,"enroll-poll":r.EnrollPoll,"redirect-idp":r.RedirectIdp,skip:r.Skip};t.AuthenticationFlow=o},9438:function(e,t,n){"use strict";t.getFlowSpecification=function(e){var t,n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",u=!0;switch(s){case"register":case"signup":case"enrollProfile":t=a.RegistrationFlow,u=!1;break;case"recoverPassword":case"resetPassword":t=o.PasswordRecoveryFlow,n=["currentAuthenticator-recover","currentAuthenticatorEnrollment-recover"],u=!1;break;case"unlockAccount":t=i.AccountUnlockFlow,u=!1,n=["unlock-account"];break;default:t=r.AuthenticationFlow}return{flow:s,remediators:t,actions:n,withCredentials:u}};var r=n(8962),o=n(5391),a=n(5333),i=n(7713)},5391:function(e,t,n){"use strict";t.PasswordRecoveryFlow=void 0;var r=n(6749),o={identify:r.Identify,"identify-recovery":r.Identify,"select-authenticator-authenticate":r.SelectAuthenticatorAuthenticate,"select-authenticator-enroll":r.SelectAuthenticatorEnroll,"challenge-authenticator":r.ChallengeAuthenticator,"authenticator-verification-data":r.AuthenticatorVerificationData,"authenticator-enrollment-data":r.AuthenticatorEnrollmentData,"reset-authenticator":r.ResetAuthenticator,"reenroll-authenticator":r.ReEnrollAuthenticator,"enroll-poll":r.EnrollPoll};t.PasswordRecoveryFlow=o},5333:function(e,t,n){"use strict";t.RegistrationFlow=void 0;var r=n(6749),o={"select-enroll-profile":r.SelectEnrollProfile,"enroll-profile":r.EnrollProfile,"authenticator-enrollment-data":r.AuthenticatorEnrollmentData,"select-authenticator-enroll":r.SelectAuthenticatorEnroll,"enroll-poll":r.EnrollPoll,"select-enrollment-channel":r.SelectEnrollmentChannel,"enrollment-channel-data":r.EnrollmentChannelData,"enroll-authenticator":r.EnrollAuthenticator,skip:r.Skip};t.RegistrationFlow=o},7646:function(){},4270:function(e,t,n){"use strict";var r=n(8962);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(9438);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(5391);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(5333);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=n(7713);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=n(7646);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}))},5294:function(e,t,n){"use strict";var r=n(5318);t.handleInteractionCodeRedirect=function(e,t){return i(this,void 0,void 0,o.default.mark((function n(){var r,i,s,u,c,l,f,d,h,p;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=e.transactionManager.load()){n.next=3;break}throw new a.AuthSdkError("No transaction data was found in storage");case 3:if(i=r.codeVerifier,s=r.state,u=new URL(t),c=u.searchParams,l=c.get("state"),f=c.get("interaction_code"),!(d=c.get("error"))){n.next=10;break}throw new a.OAuthError(d,c.get("error_description"));case 10:if(l===s){n.next=12;break}throw new a.AuthSdkError("State in redirect uri does not match with transaction state");case 12:if(f){n.next=14;break}throw new a.AuthSdkError("Unable to parse interaction_code from the url");case 14:return n.next=16,e.token.exchangeCodeForTokens({interactionCode:f,codeVerifier:i});case 16:h=n.sent,p=h.tokens,e.tokenManager.setTokens(p);case 19:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(5705),i=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}},463:function(e,t,n){"use strict";var r=n(5318);t.setGlobalRequestInterceptor=function(e){o.default.client.interceptors.request.use(e)},t.clearGlobalRequestInterceptor=function(){o.default.client.interceptors.request.clear()},t.createGlobalRequestInterceptor=function(e){return function(t){var n=e._oktaUserAgent.getHttpHeader(),r=Object.assign(Object.assign({},n),e.options.headers);Object.keys(r).forEach((function(n){(e.options.clientSecret||"X-Device-Token"!==n)&&(t.headers[n]=r[n])}))}};var o=r(n(9812))},5969:function(e,t,n){"use strict";var r=n(5318);t.request=t.HttpClient=t.Interceptor=void 0;var o=r(n(7757)),a=r(n(4575)),i=r(n(3913)),s=r(n(4098)),u=function(){function e(){(0,a.default)(this,e),this.handlers=[]}return(0,i.default)(e,[{key:"use",value:function(e){this.handlers.push({before:e})}},{key:"clear",value:function(){this.handlers=[]}}]),e}();t.Interceptor=u;var c={interceptors:{request:new u}};t.HttpClient=c,t.request=function(e,t){var n,r,a,i,u=t.method,l=void 0===u?"POST":u,f=t.headers,d=void 0===f?{}:f,h=t.credentials,p=void 0===h?"include":h,v=t.body;return n=void 0,r=void 0,a=void 0,i=o.default.mark((function t(){var n,r;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={url:e,method:l,headers:Object.assign({},d),credentials:p,body:v},c.interceptors&&c.interceptors.request.handlers.forEach((function(e){e.before(n)})),r=n.url,delete n.url,t.abrupt("return",(0,s.default)(r,n));case 5:case"end":return t.stop()}}),t)})),new(a||(a=Promise))((function(e,t){function o(e){try{u(i.next(e))}catch(e){t(e)}}function s(e){try{u(i.throw(e))}catch(e){t(e)}}function u(t){var n;t.done?e(t.value):(n=t.value,n instanceof a?n:new a((function(e){e(n)}))).then(o,s)}u((i=i.apply(n,r||[])).next())}))}},9812:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(7014)),a=r(n(9028)),i=r(n(6653)),s=n(5969),u="1.0.0",c=(0,i.default)(u).makeIdxState,l={introspect:o.default,interact:a.default,makeIdxState:c,client:s.HttpClient,LATEST_SUPPORTED_IDX_API_VERSION:u};t.default=l,e.exports=t.default},9028:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(7757)),a=r(n(3038)),i=n(5969),s=function(e){return e.json().then((function(e){return Promise.reject(e)}))};t.default=function(e){var t,n,r,u,c=e.withCredentials,l=e.clientId,f=e.baseUrl,d=e.scopes,h=void 0===d?["openid","email"]:d,p=e.redirectUri,v=e.codeChallenge,y=e.codeChallengeMethod,g=e.state,m=e.activationToken,b=e.recoveryToken,k=e.clientSecret;return t=this,n=void 0,r=void 0,u=o.default.mark((function e(){var t,n,r,u,d;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat(f,"/v1/interact"),n={client_id:l,scope:h.join(" "),redirect_uri:p,code_challenge:v,code_challenge_method:y,state:g},m&&(n.activation_token=m),b&&(n.recovery_token=b),k&&(n.client_secret=k),r=Object.entries(n).map((function(e){var t=(0,a.default)(e,2),n=t[0],r=t[1];return"".concat(n,"=").concat(encodeURIComponent(r))})).join("&"),u={"content-type":"application/x-www-form-urlencoded"},d=!1===c?"omit":"include",e.abrupt("return",(0,i.request)(t,{credentials:d,headers:u,body:r}).then((function(e){return e.ok?e.json():s(e)})).then((function(e){return e.interaction_handle})));case 9:case"end":return e.stop()}}),e)})),new(r||(r=Promise))((function(e,o){function a(e){try{s(u.next(e))}catch(e){o(e)}}function i(e){try{s(u.throw(e))}catch(e){o(e)}}function s(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,i)}s((u=u.apply(t,n||[])).next())}))},e.exports=t.default},7014:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(7757)),a=n(5969),i=n(6605);t.default=function(e){var t,n,r,s,u=e.withCredentials,c=e.domain,l=e.interactionHandle,f=e.stateHandle,d=e.version;return t=this,n=void 0,r=void 0,s=o.default.mark((function e(){var t,n,r,s,h,p,v;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,i.validateVersionConfig)(d),t="".concat(c,"/idp/idx/introspect"),n=f?{stateToken:f}:{interactionHandle:l},r={"content-type":"application/ion+json; okta-version=".concat(d),accept:"application/ion+json; okta-version=".concat(d)},s=!1===u?"omit":"include",e.next=7,(0,a.request)(t,{credentials:s,headers:r,body:JSON.stringify(n)});case 7:return h=e.sent,p=h.ok,e.next=11,h.json();case 11:if(v=e.sent,p){e.next=14;break}throw v;case 14:return e.abrupt("return",v);case 15:case"end":return e.stop()}}),e)})),new(r||(r=Promise))((function(e,o){function a(e){try{u(s.next(e))}catch(e){o(e)}}function i(e){try{u(s.throw(e))}catch(e){o(e)}}function u(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,i)}u((s=s.apply(t,n||[])).next())}))},e.exports=t.default},6653:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(8223));t.default=function(e){switch(e){case"1.0.0":return o.default;case void 0:case null:throw new Error("Api version is required");default:throw new Error("Unknown api version: ".concat(e,". Use an exact semver version."))}},e.exports=t.default},6605:function(e,t,n){"use strict";var r=n(5318);t.validateVersionConfig=function(e){if(!e)throw new Error("version is required");if((null!=e?e:"").replace(/[^0-9a-zA-Z._-]/,"")!==e||!e)throw new Error("invalid version supplied - version is required and uses semver syntax");(0,o.default)(e)};var o=r(n(6653))},4902:function(e,t){"use strict";function n(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,a=function(){};return{s:a,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.divideActionParamsByMutability=void 0;var o=function(e){return!1!==e.mutable},a=function(e){var t,r,a={},i=[],s={};if(!e.value)return i.push(e),{defaultParamsForAction:a,neededParamsForAction:i,immutableParamsForAction:s};var u,c=n(e.value);try{for(c.s();!(u=c.n()).done;){var l=u.value;o(l)?(i.push(l),null!==(t=l.value)&&void 0!==t&&t&&(a[l.name]=l.value)):s[l.name]=null!==(r=l.value)&&void 0!==r?r:""}}catch(e){c.e(e)}finally{c.f()}return{defaultParamsForAction:a,neededParamsForAction:i,immutableParamsForAction:s}};t.divideActionParamsByMutability=function(e){var t,r=[],o={},i={},s=n(e=Array.isArray(e)?e:[e]);try{for(s.s();!(t=s.n()).done;){var u=t.value,c=a(u),l=c.defaultParamsForAction,f=c.neededParamsForAction,d=c.immutableParamsForAction;r.push(f),o[u.name]=l,i[u.name]=d}}catch(e){s.e(e)}finally{s.f()}return{defaultParams:o,neededParams:r,immutableParams:i}}},8705:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(7757)),a=n(5969),i=n(4902),s=n(628),u=function(e){var t=e.actionDefinition,n=e.defaultParamsForAction,r=void 0===n?{}:n,i=e.immutableParamsForAction,u=void 0===i?{}:i,c=e.toPersist,l=t.href;return function(e){return n=this,i=void 0,f=void 0,d=o.default.mark((function n(){var i,f,d,h,p,v,y;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i={"content-type":"application/json",accept:t.accepts||"application/ion+json"},f=JSON.stringify(Object.assign(Object.assign(Object.assign({},r),e),u)),d=c&&!1===c.withCredentials?"omit":"include",n.next=5,(0,a.request)(l,{method:t.method,headers:i,body:f,credentials:d});case 5:return h=n.sent,n.next=8,h.json();case 8:if(p=n.sent,v=h.ok,y=(0,s.makeIdxState)(p,c,v),401===h.status&&'Oktadevicejwt realm="Okta Device"'===h.headers.get("WWW-Authenticate")&&(y.stepUp=!0),v){n.next=14;break}throw y;case 14:return n.abrupt("return",y);case 15:case"end":return n.stop()}}),n)})),new(f||(f=Promise))((function(e,t){function r(e){try{a(d.next(e))}catch(e){t(e)}}function o(e){try{a(d.throw(e))}catch(e){t(e)}}function a(t){var n;t.done?e(t.value):(n=t.value,n instanceof f?n:new f((function(e){e(n)}))).then(r,o)}a((d=d.apply(n,i||[])).next())}));var n,i,f,d}};t.default=function(e,t){var n=u,r=(0,i.divideActionParamsByMutability)(e),o=r.defaultParams,a=r.neededParams,s=r.immutableParams,c=n({actionDefinition:e,defaultParamsForAction:o[e.name],immutableParamsForAction:s[e.name],toPersist:t});return c.neededParams=a,c},e.exports=t.default},1813:function(e,t,n){"use strict";var r=n(5318);t.parseIdxResponse=t.parseNonRemediations=void 0;var o=r(n(3038)),a=r(n(8)),i=n(9465),s=r(n(8705)),u=n(5883),c=function(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},l=Object.fromEntries(["remediation","context"].map((function(e){return[e,!0]}))),f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r={};return Object.keys(e).filter((function(e){return!l[e]})).forEach((function(i){if("object"===(0,a.default)(e[i])&&e[i])if(e[i].rel)n[e[i].name]=(0,s.default)(e[i],t);else{var u=e[i],l=u.value,f=u.type,d=c(u,["value","type"]);r[i]=Object.assign({type:f},d),"object"===f?(r[i].value={},Object.entries(l).forEach((function(e){var a=(0,o.default)(e,2),u=a[0],c=a[1];c.rel?n["".concat(i,"-").concat(u.name||u)]=(0,s.default)(c,t):r[i].value[u]=c}))):r[i].value=l}else r[i]=e[i]})),{context:r,actions:n}};t.parseNonRemediations=f;var d=function e(t,n){Object.keys(n).forEach((function(r){if("relatesTo"===r){var o=Array.isArray(n[r])?n[r][0]:n[r];if("string"==typeof o){var a=(0,u.JSONPath)({path:o,json:t})[0];if(a)return void(n[r]=a)}}Array.isArray(n[r])&&n[r].forEach((function(n){return e(t,n)}))}))},h=function(e,t){var n=(0,i.generateRemediationFunctions)([e],t)[e.name];return Object.assign(Object.assign({},e),{action:n})};t.parseIdxResponse=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(null===(t=e.remediation)||void 0===t?void 0:t.value)||[];r.forEach((function(t){return d(e,t)}));var o=r.map((function(e){return h(e,n)})),a=f(e,n),i=a.context,s=a.actions;return{remediations:o,context:i,actions:s}}},628:function(e,t,n){"use strict";var r=n(5318);t.makeIdxState=function(e,t,n){var r,u,c,l=e,f=(0,i.parseIdxResponse)(e,t),d=f.remediations,h=f.context,p=f.actions;return{proceed:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(this,void 0,void 0,o.default.mark((function n(){var r;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=d.find((function(t){return t.name===e}))){n.next=3;break}return n.abrupt("return",Promise.reject("Unknown remediation choice: [".concat(e,"]")));case 3:return n.abrupt("return",r.action(t));case 4:case"end":return n.stop()}}),n)})))},neededToProceed:(0,a.default)(d),actions:p,context:h,rawIdxState:l,interactionCode:null===(c=null===(u=null===(r=l.successWithInteractionCode)||void 0===r?void 0:r.value)||void 0===u?void 0:u.find((function(e){return"interaction_code"===e.name})))||void 0===c?void 0:c.value,toPersist:t,requestDidSucceed:n}};var o=r(n(7757)),a=r(n(319)),i=n(1813),s=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}},8223:function(e,t,n){"use strict";t.default=void 0;var r={makeIdxState:n(628).makeIdxState};t.default=r,e.exports=t.default},9465:function(e,t,n){"use strict";var r=n(5318);t.generateRemediationFunctions=void 0;var o=r(n(8705));t.generateRemediationFunctions=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.fromEntries(e.map((function(e){return[e.name,(0,o.default)(e,t)]})))}},6141:function(e,t,n){"use strict";var r={authenticate:!0,cancel:!0,handleEmailVerifyCallback:!0,isEmailVerifyCallback:!0,parseEmailVerifyCallback:!0,isEmailVerifyCallbackError:!0,interact:!0,introspect:!0,poll:!0,proceed:!0,canProceed:!0,register:!0,recoverPassword:!0,handleInteractionCodeRedirect:!0,startTransaction:!0,unlockAccount:!0};Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return o.authenticate}}),Object.defineProperty(t,"cancel",{enumerable:!0,get:function(){return a.cancel}}),Object.defineProperty(t,"handleEmailVerifyCallback",{enumerable:!0,get:function(){return i.handleEmailVerifyCallback}}),Object.defineProperty(t,"isEmailVerifyCallback",{enumerable:!0,get:function(){return i.isEmailVerifyCallback}}),Object.defineProperty(t,"parseEmailVerifyCallback",{enumerable:!0,get:function(){return i.parseEmailVerifyCallback}}),Object.defineProperty(t,"isEmailVerifyCallbackError",{enumerable:!0,get:function(){return i.isEmailVerifyCallbackError}}),Object.defineProperty(t,"interact",{enumerable:!0,get:function(){return s.interact}}),Object.defineProperty(t,"introspect",{enumerable:!0,get:function(){return u.introspect}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return c.poll}}),Object.defineProperty(t,"proceed",{enumerable:!0,get:function(){return l.proceed}}),Object.defineProperty(t,"canProceed",{enumerable:!0,get:function(){return l.canProceed}}),Object.defineProperty(t,"register",{enumerable:!0,get:function(){return f.register}}),Object.defineProperty(t,"recoverPassword",{enumerable:!0,get:function(){return d.recoverPassword}}),Object.defineProperty(t,"handleInteractionCodeRedirect",{enumerable:!0,get:function(){return h.handleInteractionCodeRedirect}}),Object.defineProperty(t,"startTransaction",{enumerable:!0,get:function(){return p.startTransaction}}),Object.defineProperty(t,"unlockAccount",{enumerable:!0,get:function(){return v.unlockAccount}});var o=n(786),a=n(1208),i=n(7169),s=n(1440),u=n(1750),c=n(6789),l=n(8010),f=n(7479),d=n(6223),h=n(5294),p=n(3248),v=n(5752),y=n(4456);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===y[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}}))}))},1440:function(e,t,n){"use strict";var r=n(5318);t.interact=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(this,void 0,void 0,o.default.mark((function n(){var r,l,d,h,p,v,y,g,m,b,k,w,O,E,S;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=(0,c.removeNils)(t),!(null==(r=(0,i.getSavedTransactionMeta)(e,t))?void 0:r.interactionHandle)){n.next=4;break}return n.abrupt("return",f(r));case 4:return n.next=6,(0,u.createTransactionMeta)(e,Object.assign(Object.assign({},r),t));case 6:return r=n.sent,l=(0,s.getOAuthBaseUrl)(e),h=(d=r).clientId,p=d.redirectUri,v=d.state,y=d.scopes,g=d.withCredentials,m=d.codeChallenge,b=d.codeChallengeMethod,k=d.activationToken,w=d.recoveryToken,O=t.clientSecret||e.options.clientSecret,n.next=12,a.default.interact({withCredentials:g,clientId:h,baseUrl:l,scopes:y,state:v,redirectUri:p,codeChallenge:m,codeChallengeMethod:b,activationToken:k,recoveryToken:w,clientSecret:O});case 12:return E=n.sent,S=Object.assign(Object.assign({},r),{interactionHandle:E,withCredentials:g,state:v,scopes:y,recoveryToken:w,activationToken:k}),(0,i.saveTransactionMeta)(e,S),n.abrupt("return",f(S));case 16:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=r(n(9812)),i=n(4456),s=n(6496),u=n(6141),c=n(8965),l=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))};function f(e){return{meta:e,interactionHandle:e.interactionHandle,state:e.state}}},1750:function(e,t,n){"use strict";var r=n(5318);t.introspect=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c(this,void 0,void 0,o.default.mark((function n(){var r,c,l,f,d,h;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if((l=e.transactionManager.loadIdxResponse())&&(r=l.rawIdxResponse,c=l.requestDidSucceed),r){n.next=20;break}return f=t.version||u.IDX_API_VERSION,d=(0,s.getOAuthDomain)(e),n.prev=5,n.next=8,a.default.introspect(Object.assign(Object.assign({domain:d},t),{version:f}));case 8:r=n.sent,c=!0,n.next=20;break;case 12:if(n.prev=12,n.t0=n.catch(5),!(0,i.isRawIdxResponse)(n.t0)){n.next=19;break}r=n.t0,c=!1,n.next=20;break;case 19:throw n.t0;case 20:return h=t.withCredentials,n.abrupt("return",a.default.makeIdxState(r,{withCredentials:h},c));case 22:case"end":return n.stop()}}),n,null,[[5,12]])})))};var o=r(n(7757)),a=r(n(9812)),i=n(3675),s=n(6496),u=n(3754),c=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}},6789:function(e,t,n){"use strict";var r=n(5318);t.poll=function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(this,void 0,void 0,o.default.mark((function c(){var l,f,d;return o.default.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,a.proceed)(t,{startPolling:!0});case 2:if(l=c.sent,f=(0,i.getSavedTransactionMeta)(t),(null==(d=null===(n=null==f?void 0:f.remediations)||void 0===n?void 0:n.find((function(e){return e.includes("poll")})))?void 0:d.length)||(0,s.warn)("No polling remediations available at the current IDX flow stage"),!Number.isInteger(r.refresh)){c.next=8;break}return c.abrupt("return",new Promise((function(n,a){setTimeout((function(){var r,i;return u(this,void 0,void 0,o.default.mark((function s(){var u;return o.default.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:try{u=null===(i=null===(r=l.nextStep)||void 0===r?void 0:r.poll)||void 0===i?void 0:i.refresh,n(u?e(t,{refresh:u}):l)}catch(e){a(e)}case 1:case"end":return o.stop()}}),s)})))}),r.refresh)})));case 8:return c.abrupt("return",l);case 9:case"end":return c.stop()}}),c)})))};var o=r(n(7757)),a=n(8010),i=n(4456),s=n(8965),u=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}},8010:function(e,t,n){"use strict";var r=n(5318);t.canProceed=c,t.proceed=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(this,void 0,void 0,o.default.mark((function n(){var r,u,l;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(c(e,t)){n.next=2;break}throw new s.AuthSdkError("Unable to proceed: saved transaction could not be loaded");case 2:return r=t.flow,u=t.state,r||(l=(0,i.getSavedTransactionMeta)(e,{state:u}),r=null==l?void 0:l.flow),n.abrupt("return",(0,a.run)(e,Object.assign(Object.assign({},t),{flow:r})));case 5:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(8710),i=n(4456),s=n(5705),u=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))};function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,i.getSavedTransactionMeta)(e,t);return!(!n&&!t.stateHandle)}},6223:function(e,t,n){"use strict";var r=n(5318);t.recoverPassword=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(this,void 0,void 0,o.default.mark((function n(){var r;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=(0,i.getFlowSpecification)(e,"recoverPassword"),n.abrupt("return",(0,a.run)(e,Object.assign(Object.assign({},t),r)));case 2:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(8710),i=n(4270),s=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}},7479:function(e,t,n){"use strict";var r=n(5318);t.register=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(this,void 0,void 0,o.default.mark((function n(){var r,l,f;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if((0,i.hasSavedInteractionHandle)(e)){n.next=12;break}return n.next=3,(0,s.startTransaction)(e,Object.assign(Object.assign({},t),{flow:"register",autoRemediate:!1}));case 3:if(r=n.sent,l=r.enabledFeatures,f=r.availableSteps,t.activationToken||!l||l.includes(c.IdxFeature.REGISTRATION)){n.next=9;break}throw new u.AuthSdkError("Registration is not supported based on your current org configuration.");case 9:if(!t.activationToken||!(null==f?void 0:f.some((function(e){return"identify"===e.name})))){n.next=12;break}throw new u.AuthSdkError("activationToken is not supported based on your current org configuration.");case 12:return n.abrupt("return",(0,a.run)(e,Object.assign(Object.assign({},t),{flow:"register"})));case 13:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(8710),i=n(4456),s=n(3248),u=n(5705),c=n(858),l=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}},4122:function(e,t,n){"use strict";var r=n(5318);t.getRemediator=p,t.remediate=function e(t,n,r){return h(this,void 0,void 0,o.default.mark((function u(){var l,d,h,b,k,w,O,E,S,T,_,x,A,R,P,j,C,M;return o.default.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(d=(l=t).neededToProceed,h=l.interactionCode,b=r.flow,!h){u.next=4;break}return u.abrupt("return",{idxResponse:t});case 4:if(k=(0,c.isTerminalResponse)(t),w=(0,c.getMessagesFromResponse)(t),!k){u.next=8;break}return u.abrupt("return",{idxResponse:t,terminal:k,messages:w});case 8:if(O=p(d,n,r),E=g(n,t),S=r.actions||[],!(T=[].concat((0,i.default)(S),(0,i.default)(E&&[E]||[])))){u.next=32;break}_=f(T),u.prev=14,A=o.default.mark((function a(){var i,s,u;return o.default.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(i=x.value,s=m(n),u=Object.assign(Object.assign({},r),{actions:S.filter((function(e){return e!==i}))}),"function"!=typeof t.actions[i]){o.next=17;break}return o.prev=4,o.next=7,t.actions[i]();case 7:(t=o.sent).requestDidSucceed=!0,o.next=14;break;case 11:return o.prev=11,o.t0=o.catch(4),o.abrupt("return",{v:y(o.t0,O)});case 14:if("cancel"!==i){o.next=16;break}return o.abrupt("return",{v:{idxResponse:t,canceled:!0}});case 16:return o.abrupt("return",{v:e(t,s,u)});case 17:if(!d.find((function(e){return e.name===i}))){o.next=30;break}return o.prev=19,o.next=22,t.proceed(i,{});case 22:(t=o.sent).requestDidSucceed=!0,o.next=29;break;case 26:return o.prev=26,o.t1=o.catch(19),o.abrupt("return",{v:y(o.t1,O)});case 29:return o.abrupt("return",{v:e(t,n,u)});case 30:case"end":return o.stop()}}),a,null,[[4,11],[19,26]])})),_.s();case 17:if((x=_.n()).done){u.next=24;break}return u.delegateYield(A(),"t0",19);case 19:if(R=u.t0,"object"!==(0,a.default)(R)){u.next=22;break}return u.abrupt("return",R.v);case 22:u.next=17;break;case 24:u.next=29;break;case 26:u.prev=26,u.t1=u.catch(14),_.e(u.t1);case 29:return u.prev=29,_.f(),u.finish(29);case 32:if(O){u.next=49;break}if(!r.step){u.next=46;break}return n=(0,c.filterValuesForRemediation)(t,n),u.prev=35,u.next=38,t.proceed(r.step,n);case 38:return(t=u.sent).requestDidSucceed=!0,u.abrupt("return",{idxResponse:t});case 43:return u.prev=43,u.t2=u.catch(35),u.abrupt("return",y(u.t2));case 46:if("default"!==b){u.next=48;break}return u.abrupt("return",{idxResponse:t});case 48:throw new s.AuthSdkError("\n No remediation can match current flow, check policy settings in your org.\n Remediations: [".concat(d.reduce((function(e,t){return e?e+" ,"+t.name:t.name}),""),"]\n "));case 49:if(!w.length){u.next=52;break}return P=v(O,t),u.abrupt("return",{idxResponse:t,nextStep:P,messages:w});case 52:if(O.canRemediate()){u.next=55;break}return j=v(O,t),u.abrupt("return",{idxResponse:t,nextStep:j});case 55:return C=O.getName(),M=O.getData(),u.prev=57,u.next=60,t.proceed(C,M);case 60:return(t=u.sent).requestDidSucceed=!0,n=O.getValuesAfterProceed(),delete r.step,u.abrupt("return",e(t,n,r));case 67:return u.prev=67,u.t3=u.catch(57),u.abrupt("return",y(u.t3,O));case 70:case"end":return u.stop()}}),u,null,[[14,26,29,32],[35,43],[57,67]])})))};var o=r(n(7757)),a=r(n(8)),i=r(n(319)),s=n(5705),u=n(3675),c=n(9581),l=n(8965);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))};function p(e,t,n){var r,o=n.remediators;if(!n.step){var a,i=[],s=f(e);try{for(s.s();!(a=s.n()).done;){var u=a.value;if(Object.keys(o).includes(u.name)){if((r=new(0,o[u.name])(u,t,n)).canRemediate())return r;i.push(r)}}}catch(e){s.e(e)}finally{s.f()}return i[0]}var c=e.find((function(e){return e.name===n.step}));if(c){var d=c?o[c.name]:void 0;return d?new d(c,t,n):void 0}(0,l.warn)('step "'.concat(n.step,'" did not match any remediations'))}function v(e,t){var n=e.getNextStep(t.context),r=(0,c.canSkipFn)(t),o=(0,c.canResendFn)(t);return Object.assign(Object.assign(Object.assign({},n),r&&{canSkip:r}),o&&{canResend:o})}function y(e,t){var n=(0,u.isIdxResponse)(e)?e:null;if(!n)throw e;n.requestDidSucceed=!1;var r=(0,c.isTerminalResponse)(n),o=(0,c.getMessagesFromResponse)(n);if(r)return{idxResponse:n,terminal:r,messages:o};var a=t&&v(t,n);return Object.assign({idxResponse:n,messages:o},a&&{nextStep:a})}function g(e,t){return Object.keys(t.actions).find((function(t){return!!e.resend&&t.includes("-resend")}))}function m(e){return e.resend=void 0,e}},6874:function(e,t,n){"use strict";var r=n(5318);t.AuthenticatorEnrollmentData=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(6525)),s=r(n(2205)),u=r(n(8585)),c=r(n(9754)),l=n(8298),f=n(5323);var d=function(e){(0,s.default)(l,e);var t,n,r=(t=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.default)(t);if(n){var o=(0,c.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function l(){return(0,o.default)(this,l),r.apply(this,arguments)}return(0,a.default)(l,[{key:"mapAuthenticator",value:function(){var e=this.getAuthenticatorData();return{id:(0,f.getAuthenticatorFromRemediation)(this.remediation).form.value.find((function(e){return"id"===e.name})).value,methodType:e.methodType,phoneNumber:e.phoneNumber}}},{key:"getInputAuthenticator",value:function(){return[{name:"methodType",type:"string",required:!0},{name:"phoneNumber",type:"string",required:!0,label:"Phone Number"}]}},{key:"mapAuthenticatorDataFromValues",value:function(e){e=(0,i.default)((0,c.default)(l.prototype),"mapAuthenticatorDataFromValues",this).call(this,e);var t=this.values.phoneNumber;if(e||t)return Object.assign(Object.assign({},e&&e),t&&{phoneNumber:t})}}]),l}(l.AuthenticatorData);t.AuthenticatorEnrollmentData=d,d.remediationName="authenticator-enrollment-data"},8129:function(e,t,n){"use strict";var r=n(5318);t.AuthenticatorVerificationData=void 0;var o=r(n(9713)),a=r(n(319)),i=r(n(4575)),s=r(n(3913)),u=r(n(6525)),c=r(n(2205)),l=r(n(8585)),f=r(n(9754)),d=n(5705);var h=function(e){(0,c.default)(h,e);var t,n,r=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,f.default)(t);if(n){var o=(0,f.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.default)(this,e)});function h(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.default)(this,h),(t=r.call(this,e,n)).shouldProceedWithEmailAuthenticator=1===t.authenticator.methods.length&&"email"===t.authenticator.methods[0].type,t}return(0,s.default)(h,[{key:"canRemediate",value:function(){return!!this.shouldProceedWithEmailAuthenticator||(0,u.default)((0,f.default)(h.prototype),"canRemediate",this).call(this)}},{key:"mapAuthenticator",value:function(){var e;return this.shouldProceedWithEmailAuthenticator?null===(e=this.getAuthenticatorFromRemediation().form)||void 0===e?void 0:e.value.reduce((function(e,t){if(t.value)e[t.name]=t.value;else{if(!t.options)throw new d.AuthSdkError("Unsupported authenticator data type: ".concat(t));e[t.name]=t.options[0].value}return e}),{}):this.getAuthenticatorData()}},{key:"getInputAuthenticator",value:function(){var e=this.getAuthenticatorFromRemediation(),t=e.form.value.find((function(e){return"methodType"===e.name}));return t&&t.options?{name:"methodType",type:"string",required:!0}:(0,a.default)(e.form.value)}},{key:"getValuesAfterProceed",value:function(){var e=this;return this.values=(0,u.default)((0,f.default)(h.prototype),"getValuesAfterProceed",this).call(this),Object.keys(this.values).filter((function(e){return"authenticator"!==e})).reduce((function(t,n){return Object.assign(Object.assign({},t),(0,o.default)({},n,e.values[n]))}),{})}}]),h}(n(8298).AuthenticatorData);t.AuthenticatorVerificationData=h,h.remediationName="authenticator-verification-data"},8298:function(e,t,n){"use strict";var r=n(5318);t.AuthenticatorData=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(6525)),s=r(n(2205)),u=r(n(8585)),c=r(n(9754)),l=n(8674),f=n(6473),d=n(1825);var h=function(e){(0,s.default)(l,e);var t,n,r=(t=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.default)(t);if(n){var o=(0,c.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function l(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.default)(this,l),(t=r.call(this,e,n)).authenticator=t.getAuthenticator(),t.formatAuthenticatorData(),t}return(0,a.default)(l,[{key:"formatAuthenticatorData",value:function(){var e=this;if(this.getAuthenticatorData())this.values.authenticatorsData=this.values.authenticatorsData.map((function(t){return(0,d.compareAuthenticators)(e.authenticator,t)?e.mapAuthenticatorDataFromValues(t):t}));else{var t=this.mapAuthenticatorDataFromValues();t&&this.values.authenticatorsData.push(t)}}},{key:"getAuthenticatorData",value:function(){var e=this;return this.values.authenticatorsData.find((function(t){return(0,d.compareAuthenticators)(e.authenticator,t)}))}},{key:"canRemediate",value:function(){var e=this;return this.values.authenticatorsData.some((function(t){return(0,d.compareAuthenticators)(e.authenticator,t)}))}},{key:"getNextStep",value:function(){var e=(0,i.default)((0,c.default)(l.prototype),"getNextStep",this).call(this),t=this.getMethodTypes();return Object.assign(Object.assign({},e),t&&{options:t})}},{key:"mapAuthenticatorDataFromValues",value:function(e){var t=this.values,n=t.methodType,r=t.authenticator;!n&&(0,f.isAuthenticator)(r)&&(n=null==r?void 0:r.methodType);var o=this.authenticator,a=o.id,i=o.enrollmentId,s=Object.assign(Object.assign({id:a,enrollmentId:i},e&&e),n&&{methodType:n});return s.methodType?s:null}},{key:"getAuthenticatorFromRemediation",value:function(){return this.remediation.value.find((function(e){return"authenticator"===e.name}))}},{key:"getMethodTypes",value:function(){var e;return null===(e=this.getAuthenticatorFromRemediation().form.value.find((function(e){return"methodType"===e.name})))||void 0===e?void 0:e.options}},{key:"getValuesAfterProceed",value:function(){var e=this;this.values=(0,i.default)((0,c.default)(l.prototype),"getValuesAfterProceed",this).call(this);var t=this.values.authenticatorsData.filter((function(t){return!0!==(0,d.compareAuthenticators)(e.authenticator,t)}));return Object.assign(Object.assign({},this.values),{authenticatorsData:t})}}]),l}(l.Remediator);t.AuthenticatorData=h},8674:function(e,t,n){"use strict";var r=n(5318);t.Remediator=void 0;var o=r(n(319)),a=r(n(8)),i=r(n(4575)),s=r(n(3913)),u=n(5323),c=n(1825);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,i.default)(this,e),this.values=Object.assign({},n),this.options=Object.assign({},r),this.formatAuthenticators(),this.remediation=t}return(0,s.default)(e,[{key:"formatAuthenticators",value:function(){if(this.values.authenticators=this.values.authenticators||[],this.values.authenticators=this.values.authenticators.map((function(e){return(0,c.formatAuthenticator)(e)})),this.values.authenticator){var e=(0,c.formatAuthenticator)(this.values.authenticator);this.values.authenticators.some((function(t){return(0,c.compareAuthenticators)(e,t)}))||this.values.authenticators.push(e)}this.values.authenticatorsData=this.values.authenticators.reduce((function(e,t){return"object"===(0,a.default)(t)&&Object.keys(t).length>1&&e.push(t),e}),this.values.authenticatorsData||[])}},{key:"getName",value:function(){return this.remediation.name}},{key:"canRemediate",value:function(){var e=this;return!(0,u.getRequiredValues)(this.remediation).find((function(t){return!e.hasData(t)}))}},{key:"getData",value:function(e){var t=this;if(!e){var n=(0,u.getAllValues)(this.remediation).reduce((function(e,n){return e[n]=t.getData(n),e}),{});return n}if("function"==typeof this["map".concat((0,u.titleCase)(e))]){var r=this["map".concat((0,u.titleCase)(e))](this.remediation.value.find((function(t){return t.name===e})));if(r)return r}if(this.map&&this.map[e])for(var o=this.map[e],a=0;a<o.length;a++){var i=this.values[o[a]];if(i)return i}return this.values[e]}},{key:"hasData",value:function(e){return!!this.getData(e)}},{key:"getNextStep",value:function(e){var t=this.getName(),n=this.getInputs(),r=this.getAuthenticator(),o=null==r?void 0:r.type;return Object.assign(Object.assign({name:t,inputs:n},o&&{type:o}),r&&{authenticator:r})}},{key:"getInputs",value:function(){var e=this,t=[];return(this.remediation.value||[]).forEach((function(n){var r,o=n.name,a=n.type;if(!1!==n.visible){if("function"==typeof e["getInput".concat((0,u.titleCase)(o))])r=e["getInput".concat((0,u.titleCase)(o))](n);else if("object"!==a){var i,s=(e.map?e.map[o]:null)||[];i=1===s.length?s[0]:s.find((function(t){return Object.keys(e.values).includes(t)})),i&&(r=Object.assign(Object.assign({},n),{name:i}))}r||(r=n),Array.isArray(r)?r.forEach((function(e){return t.push(e)})):t.push(r)}})),t}},{key:"getValuesAfterProceed",value:function(){var e,t=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}(this.getInputs());try{for(t.s();!(e=t.n()).done;){var n=e.value;delete this.values[n.name]}}catch(e){t.e(e)}finally{t.f()}return this.values}},{key:"getAuthenticator",value:function(){var e,t,n=null===(e=this.remediation.relatesTo)||void 0===e?void 0:e.value;if(n){var r=(0,u.getAuthenticatorFromRemediation)(this.remediation);if(!r)return n;var o=r.form.value.find((function(e){return"id"===e.name})).value,a=null===(t=r.form.value.find((function(e){return"enrollmentId"===e.name})))||void 0===t?void 0:t.value;return Object.assign(Object.assign({},n),{id:o,enrollmentId:a})}}}],[{key:"getMessages",value:function(e){var t,n;if(e.value)return null===(n=null===(t=e.value[0])||void 0===t?void 0:t.form)||void 0===n?void 0:n.value.reduce((function(e,t){return t.messages&&(e=[].concat((0,o.default)(e),(0,o.default)(t.messages.value))),e}),[])}}]),e}();t.Remediator=f},6255:function(e,t,n){"use strict";var r=n(5318);t.SelectAuthenticator=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(6525)),s=r(n(2205)),u=r(n(8585)),c=r(n(9754)),l=n(8674),f=n(5323),d=n(6473),h=n(1825);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v=function(e){(0,s.default)(l,e);var t,n,r=(t=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.default)(t);if(n){var o=(0,c.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function l(){return(0,o.default)(this,l),r.apply(this,arguments)}return(0,a.default)(l,[{key:"findMatchedOption",value:function(e,t){var n,r,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}(e);try{var a=function(){var e=r.value;if(n=t.find((function(t){return t.relatesTo.key===e.key})))return"break"};for(o.s();!(r=o.n()).done&&"break"!==a(););}catch(e){o.e(e)}finally{o.f()}return n}},{key:"canRemediate",value:function(){var e=this.values,t=e.authenticators,n=e.authenticator,r=(0,f.getAuthenticatorFromRemediation)(this.remediation).options;return!!(t&&t.length&&((0,d.isAuthenticator)(n)&&n.id||this.findMatchedOption(t,r)))}},{key:"getNextStep",value:function(){var e=(0,i.default)((0,c.default)(l.prototype),"getNextStep",this).call(this),t=(0,f.getAuthenticatorFromRemediation)(this.remediation).options.map((function(e){return{label:e.label,value:e.relatesTo.key}}));return Object.assign(Object.assign({},e),{options:t})}},{key:"mapAuthenticator",value:function(e){var t=this.values,n=t.authenticators,r=t.authenticator;if((0,d.isAuthenticator)(r)&&r.id)return this.selectedAuthenticator=r,r;var o=e.options,a=(0,h.findMatchedOption)(n,o);return this.selectedAuthenticator=a.relatesTo,this.selectedOption=a,{id:null==a?void 0:a.value.form.value.find((function(e){return"id"===e.name})).value}}},{key:"getInputAuthenticator",value:function(){return{name:"authenticator",key:"string"}}},{key:"getValuesAfterProceed",value:function(){var e=this;this.values=(0,i.default)((0,c.default)(l.prototype),"getValuesAfterProceed",this).call(this);var t=this.values.authenticators.filter((function(t){return!0!==(0,h.compareAuthenticators)(t,e.selectedAuthenticator)}));return Object.assign(Object.assign({},this.values),{authenticators:t})}}]),l}(l.Remediator);t.SelectAuthenticator=v},1571:function(e,t,n){"use strict";var r=n(5318);t.VerifyAuthenticator=void 0;var o=r(n(9713)),a=r(n(4575)),i=r(n(3913)),s=r(n(6525)),u=r(n(2205)),c=r(n(8585)),l=r(n(9754)),f=n(8674),d=n(2756);var h=function(e){(0,u.default)(f,e);var t,n,r=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.default)(t);if(n){var o=(0,l.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.default)(this,e)});function f(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.default)(this,f),(t=r.call(this,e,n)).authenticator=(0,d.getAuthenticator)(e),t}return(0,i.default)(f,[{key:"getNextStep",value:function(e){var t,n=(0,s.default)((0,l.default)(f.prototype),"getNextStep",this).call(this,e),r=null===(t=null==e?void 0:e.authenticatorEnrollments)||void 0===t?void 0:t.value;return Object.assign(Object.assign({},n),{authenticatorEnrollments:r})}},{key:"canRemediate",value:function(){return this.authenticator.canVerify(this.values)}},{key:"mapCredentials",value:function(){return this.authenticator.mapCredentials(this.values)}},{key:"getInputCredentials",value:function(e){return this.authenticator.getInputs(e)}},{key:"getValuesAfterProceed",value:function(){var e=this;return this.values=(0,s.default)((0,l.default)(f.prototype),"getValuesAfterProceed",this).call(this),Object.keys(this.values).filter((function(e){return"credentials"!==e})).reduce((function(t,n){return Object.assign(Object.assign({},t),(0,o.default)({},n,e.values[n]))}),{})}}]),f}(f.Remediator);t.VerifyAuthenticator=h},7873:function(e,t,n){"use strict";var r=n(5318);t.ChallengeAuthenticator=void 0;var o=r(n(4575)),a=r(n(2205)),i=r(n(8585)),s=r(n(9754));var u=function(e){(0,a.default)(u,e);var t,n,r=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.default)(this,e)});function u(){return(0,o.default)(this,u),r.apply(this,arguments)}return u}(n(1571).VerifyAuthenticator);t.ChallengeAuthenticator=u,u.remediationName="challenge-authenticator"},6759:function(e,t,n){"use strict";var r=n(5318);t.ChallengePoll=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),s=r(n(8585)),u=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canRemediate",value:function(){return!!this.values.startPolling||"challenge-poll"===this.options.step}}]),c}(n(9084).EnrollPoll);t.ChallengePoll=c,c.remediationName="challenge-poll"},7282:function(e,t,n){"use strict";var r=n(5318);t.EnrollAuthenticator=void 0;var o=r(n(4575)),a=r(n(2205)),i=r(n(8585)),s=r(n(9754));var u=function(e){(0,a.default)(u,e);var t,n,r=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.default)(this,e)});function u(){return(0,o.default)(this,u),r.apply(this,arguments)}return u}(n(1571).VerifyAuthenticator);t.EnrollAuthenticator=u,u.remediationName="enroll-authenticator"},9084:function(e,t,n){"use strict";var r=n(5318);t.EnrollPoll=void 0;var o=r(n(9713)),a=r(n(4575)),i=r(n(3913)),s=r(n(6525)),u=r(n(2205)),c=r(n(8585)),l=r(n(9754));var f=function(e){(0,u.default)(f,e);var t,n,r=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.default)(t);if(n){var o=(0,l.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.default)(this,e)});function f(){return(0,a.default)(this,f),r.apply(this,arguments)}return(0,i.default)(f,[{key:"canRemediate",value:function(){return!!this.values.startPolling||"enroll-poll"===this.options.step}},{key:"getNextStep",value:function(e){var t=(0,s.default)((0,l.default)(f.prototype),"getNextStep",this).call(this,e),n=this.getAuthenticator();return!n&&(null==e?void 0:e.currentAuthenticator)&&(n=e.currentAuthenticator.value),Object.assign(Object.assign({},t),{authenticator:n,poll:{required:!0,refresh:this.remediation.refresh}})}},{key:"getValuesAfterProceed",value:function(){var e=this;return Object.keys(this.values).filter((function(e){return"startPolling"!==e})).reduce((function(t,n){return Object.assign(Object.assign({},t),(0,o.default)({},n,e.values[n]))}),{})}}]),f}(n(8674).Remediator);t.EnrollPoll=f,f.remediationName="enroll-poll"},4218:function(e,t,n){"use strict";var r=n(5318);t.EnrollProfile=void 0;var o=r(n(319)),a=r(n(9713)),i=r(n(4575)),s=r(n(3913)),u=r(n(2205)),c=r(n(8585)),l=r(n(9754));var f=function(e){(0,u.default)(f,e);var t,n,r=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.default)(t);if(n){var o=(0,l.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.default)(this,e)});function f(){return(0,i.default)(this,f),r.apply(this,arguments)}return(0,s.default)(f,[{key:"canRemediate",value:function(){var e=this.getData().userProfile;return!!e&&this.remediation.value.find((function(e){return"userProfile"===e.name})).form.value.reduce((function(t,n){return n.required&&(t=t&&!!e[n.name]),t}),!0)}},{key:"mapUserProfile",value:function(e){var t=this,n=e.form.value.map((function(e){return e.name})).reduce((function(e,n){return t.values[n]?Object.assign(Object.assign({},e),(0,a.default)({},n,t.values[n])):e}),{});if(0!==Object.keys(n).length)return n}},{key:"getInputUserProfile",value:function(e){return(0,o.default)(e.form.value)}},{key:"getErrorMessages",value:function(e){return e.value[0].form.value.reduce((function(e,t){return t.messages&&e.push(t.messages.value[0].message),e}),[])}}]),f}(n(8674).Remediator);t.EnrollProfile=f,f.remediationName="enroll-profile"},9580:function(e,t,n){"use strict";var r=n(5318);t.EnrollmentChannelData=void 0;var o=r(n(9713)),a=r(n(4575)),i=r(n(3913)),s=r(n(6525)),u=r(n(2205)),c=r(n(8585)),l=r(n(9754));var f=function(e){(0,u.default)(f,e);var t,n,r=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.default)(t);if(n){var o=(0,l.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.default)(this,e)});function f(){return(0,a.default)(this,f),r.apply(this,arguments)}return(0,i.default)(f,[{key:"getInputEmail",value:function(){return[{name:"email",type:"string",required:!0,label:"Email"}]}},{key:"getInputPhoneNumber",value:function(){return[{name:"phoneNumber",type:"string",required:!0,label:"Phone Number"}]}},{key:"canRemediate",value:function(){return Boolean(this.values.email||this.values.phoneNumber)}},{key:"getNextStep",value:function(e){var t=(0,s.default)((0,l.default)(f.prototype),"getNextStep",this).call(this),n=e.currentAuthenticator.value;return Object.assign(Object.assign({},t),{authenticator:n})}},{key:"getData",value:function(){return{stateHandle:this.values.stateHandle,email:this.values.email,phoneNumber:this.values.phoneNumber}}},{key:"getValuesAfterProceed",value:function(){var e=this;return Object.keys(this.values).filter((function(e){return!["email","phoneNumber"].includes(e)})).reduce((function(t,n){return Object.assign(Object.assign({},t),(0,o.default)({},n,e.values[n]))}),{})}}]),f}(n(8674).Remediator);t.EnrollmentChannelData=f,f.remediationName="enrollment-channel-data"},3263:function(e,t,n){"use strict";var r=n(5318);t.Identify=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),s=r(n(8585)),u=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function c(){var e;return(0,o.default)(this,c),(e=r.apply(this,arguments)).map={identifier:["username"]},e}return(0,a.default)(c,[{key:"canRemediate",value:function(){return!!this.getData().identifier}},{key:"mapCredentials",value:function(){var e=this.values,t=e.credentials,n=e.password;if(t||n)return t||{passcode:n}}},{key:"getInputCredentials",value:function(e){return Object.assign(Object.assign({},e.form.value[0]),{name:"password",required:e.required})}}]),c}(n(8674).Remediator);t.Identify=c,c.remediationName="identify"},2818:function(e,t,n){"use strict";var r=n(5318);t.ReEnrollAuthenticator=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),s=r(n(8585)),u=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"mapCredentials",value:function(){var e=this.values.newPassword;if(e)return{passcode:e}}},{key:"getInputCredentials",value:function(e){var t="password"===this.getAuthenticator().type?"newPassword":"verificationCode";return Object.assign(Object.assign({},e.form.value[0]),{name:t})}}]),c}(n(8674).Remediator);t.ReEnrollAuthenticator=c,c.remediationName="reenroll-authenticator"},3963:function(e,t,n){"use strict";var r=n(5318);t.RedirectIdp=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),s=r(n(8585)),u=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canRemediate",value:function(){return!1}},{key:"getNextStep",value:function(){var e=this.remediation;return{name:e.name,type:e.type,idp:e.idp,href:e.href}}}]),c}(n(8674).Remediator);t.RedirectIdp=c,c.remediationName="redirect-idp"},6703:function(e,t,n){"use strict";var r=n(5318);t.ResetAuthenticator=void 0;var o=r(n(4575)),a=r(n(2205)),i=r(n(8585)),s=r(n(9754));var u=function(e){(0,a.default)(u,e);var t,n,r=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.default)(this,e)});function u(){return(0,o.default)(this,u),r.apply(this,arguments)}return u}(n(1571).VerifyAuthenticator);t.ResetAuthenticator=u,u.remediationName="reset-authenticator"},7459:function(e,t,n){"use strict";var r=n(5318);t.SelectAuthenticatorAuthenticate=void 0;var o=r(n(319)),a=r(n(4575)),i=r(n(2205)),s=r(n(8585)),u=r(n(9754)),c=n(6255),l=n(5323),f=n(6473);var d=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function c(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,a.default)(this,c);var u="recoverPassword"===(t=r.call(this,e,i,s)).options.flow,d=null===(n=(0,l.getAuthenticatorFromRemediation)(e).options)||void 0===n?void 0:n.some((function(e){var t=e.relatesTo;return(null==t?void 0:t.key)===f.AuthenticatorKey.OKTA_PASSWORD}));return d&&(u||t.values.password)&&(t.values.authenticators=[].concat((0,o.default)(t.values.authenticators||[]),[{key:f.AuthenticatorKey.OKTA_PASSWORD}])),t}return c}(c.SelectAuthenticator);t.SelectAuthenticatorAuthenticate=d,d.remediationName="select-authenticator-authenticate"},6400:function(e,t,n){"use strict";var r=n(5318);t.SelectAuthenticatorEnroll=void 0;var o=r(n(4575)),a=r(n(2205)),i=r(n(8585)),s=r(n(9754));var u=function(e){(0,a.default)(u,e);var t,n,r=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.default)(this,e)});function u(){return(0,o.default)(this,u),r.apply(this,arguments)}return u}(n(6255).SelectAuthenticator);t.SelectAuthenticatorEnroll=u,u.remediationName="select-authenticator-enroll"},8064:function(e,t,n){"use strict";var r=n(5318);t.SelectAuthenticatorUnlockAccount=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(6525)),s=r(n(2205)),u=r(n(8585)),c=r(n(9754));var l=function(e){(0,s.default)(l,e);var t,n,r=(t=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.default)(t);if(n){var o=(0,c.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function l(){var e;return(0,o.default)(this,l),(e=r.apply(this,arguments)).map={identifier:["username"]},e}return(0,a.default)(l,[{key:"canRemediate",value:function(){return!!this.getData("identifier")&&(0,i.default)((0,c.default)(l.prototype),"canRemediate",this).call(this)}},{key:"mapAuthenticator",value:function(e){var t,n,r,o=(0,i.default)((0,c.default)(l.prototype),"mapAuthenticator",this).call(this,e),a=null===(t=this.selectedOption)||void 0===t?void 0:t.value.form.value.find((function(e){return"methodType"===e.name})),s=this.values.methodType||(null==a?void 0:a.value)||(null===(r=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n[0])||void 0===r?void 0:r.value);return s?Object.assign(Object.assign({},o),{methodType:s}):o}},{key:"getInputUsername",value:function(){return{name:"username",key:"string"}}}]),l}(n(6255).SelectAuthenticator);t.SelectAuthenticatorUnlockAccount=l,l.remediationName="select-authenticator-unlock-account"},2552:function(e,t,n){"use strict";var r=n(5318);t.SelectEnrollProfile=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),s=r(n(8585)),u=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canRemediate",value:function(){return!0}}]),c}(n(8674).Remediator);t.SelectEnrollProfile=c,c.remediationName="select-enroll-profile"},4982:function(e,t,n){"use strict";var r=n(5318);t.SelectEnrollmentChannel=void 0;var o=r(n(9713)),a=r(n(4575)),i=r(n(3913)),s=r(n(6525)),u=r(n(2205)),c=r(n(8585)),l=r(n(9754)),f=n(8674),d=n(5323);var h=function(e){(0,u.default)(f,e);var t,n,r=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.default)(t);if(n){var o=(0,l.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.default)(this,e)});function f(){return(0,a.default)(this,f),r.apply(this,arguments)}return(0,i.default)(f,[{key:"canRemediate",value:function(){return Boolean(this.values.channel)}},{key:"getNextStep",value:function(e){var t=(0,s.default)((0,l.default)(f.prototype),"getNextStep",this).call(this),n=this.getChannels(),r=e.currentAuthenticator.value;return Object.assign(Object.assign(Object.assign({},t),n&&{options:n}),{authenticator:r})}},{key:"getChannels",value:function(){var e;return null===(e=(0,d.getAuthenticatorFromRemediation)(this.remediation).value.form.value.find((function(e){return"channel"===e.name})))||void 0===e?void 0:e.options}},{key:"getData",value:function(){return{authenticator:{id:this.remediation.value[0].value.form.value[0].value,channel:this.values.channel},stateHandle:this.values.stateHandle}}},{key:"getValuesAfterProceed",value:function(){var e=this;return Object.keys(this.values).filter((function(e){return"channel"!==e})).reduce((function(t,n){return Object.assign(Object.assign({},t),(0,o.default)({},n,e.values[n]))}),{})}}]),f}(f.Remediator);t.SelectEnrollmentChannel=h,h.remediationName="select-enrollment-channel"},554:function(e,t,n){"use strict";var r=n(5318);t.Skip=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),s=r(n(8585)),u=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canRemediate",value:function(){return!!this.values.skip||"skip"===this.options.step}}]),c}(n(8674).Remediator);t.Skip=c,c.remediationName="skip"},6749:function(e,t,n){"use strict";var r=n(8674);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(7282);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(9084);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(4982);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=n(9580);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=n(7873);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=n(6759);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=n(6703);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var f=n(4218);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var d=n(3263);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var h=n(2818);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=n(3963);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var v=n(7459);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===v[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}}))}));var y=n(6400);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===y[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}}))}));var g=n(8064);Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var m=n(2552);Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===m[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return m[e]}}))}));var b=n(8129);Object.keys(b).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===b[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return b[e]}}))}));var k=n(6874);Object.keys(k).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===k[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return k[e]}}))}));var w=n(554);Object.keys(w).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===w[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return w[e]}}))}))},5323:function(e,t){"use strict";t.getAllValues=function(e){var t;return null===(t=e.value)||void 0===t?void 0:t.map((function(e){return e.name}))},t.getRequiredValues=function(e){var t;return null===(t=e.value)||void 0===t?void 0:t.reduce((function(e,t){return t.required&&e.push(t.name),e}),[])},t.titleCase=function(e){return e.charAt(0).toUpperCase()+e.substring(1)},t.getAuthenticatorFromRemediation=function(e){return e.value.find((function(e){return"authenticator"===e.name}))}},8710:function(e,t,n){"use strict";var r=n(5318);t.run=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,o.default.mark((function n(){var r,a,i,s,u,c,l,d,h,m,w,O,E,S,T,_,x,A,R,P,j,C;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r={options:t,values:p(t)},r=v(e,r),n.prev=2,n.next=5,y(e,r);case 5:return r=n.sent,n.next=8,g(r);case 8:r=n.sent,n.next=14;break;case 11:n.prev=11,n.t0=n.catch(2),r=k(n.t0,r);case 14:return n.next=16,b(e,r);case 16:return r=n.sent,i=(a=r).idxResponse,s=a.meta,u=a.shouldClearTransaction,c=a.clearSharedStorage,l=a.status,d=a.enabledFeatures,h=a.availableSteps,m=a.tokens,w=a.nextStep,O=a.messages,E=a.error,S=a.interactionCode,u?e.transactionManager.clear({clearSharedStorage:c}):((0,f.saveTransactionMeta)(e,Object.assign({},s)),i&&(T=i.rawIdxState,_=i.requestDidSucceed,e.transactionManager.saveIdxResponse({rawIdxResponse:T,requestDidSucceed:_}))),A=(x=i||{}).actions,R=x.context,P=x.neededToProceed,j=x.proceed,C=x.rawIdxState,n.abrupt("return",Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({status:l},s&&{meta:s}),d&&{enabledFeatures:d}),h&&{availableSteps:h}),m&&{tokens:m}),w&&{nextStep:w}),O&&O.length&&{messages:O}),E&&{error:E}),{interactionCode:S,actions:A,context:R,neededToProceed:P,proceed:j,rawIdxState:C}));case 21:case"end":return n.stop()}}),n,null,[[2,11]])})))};var o=r(n(7757)),a=n(1440),i=n(1750),s=n(4122),u=n(4270),c=n(858),l=n(3675),f=n(4456),d=n(9581),h=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))};function p(e){var t=Object.assign({},e);return["flow","remediators","actions","withCredentials","step"].forEach((function(e){delete t[e]})),t}function v(e,t){var n=t.options,r=n.flow,o=n.withCredentials,a=n.remediators,i=n.actions,s=c.IdxStatus.PENDING;if(r=r||e.idx.getFlow()||"default"){e.idx.setFlow(r);var l=(0,u.getFlowSpecification)(e,r);o=void 0!==o?o:l.withCredentials,a=a||l.remediators,i=i||l.actions}return Object.assign(Object.assign({},t),{options:Object.assign(Object.assign({},n),{flow:r,withCredentials:o,remediators:a,actions:i}),status:s})}function y(e,t){return h(this,void 0,void 0,o.default.mark((function n(){var r,s,u,c,l,d,h,p,v,y,g,m;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=t.options,s=r.stateHandle,u=r.withCredentials,c=r.version,l=r.state,d=r.scopes,h=r.recoveryToken,p=r.activationToken,!s){n.next=8;break}return n.next=5,(0,i.introspect)(e,{withCredentials:u,version:c,stateHandle:s});case 5:v=n.sent,n.next=20;break;case 8:if(y=(0,f.getSavedTransactionMeta)(e,{state:l,recoveryToken:h,activationToken:p}),g=null==y?void 0:y.interactionHandle){n.next=17;break}return e.transactionManager.clear(),n.next=14,(0,a.interact)(e,{withCredentials:u,state:l,scopes:d,activationToken:p,recoveryToken:h});case 14:m=n.sent,g=m.interactionHandle,y=m.meta;case 17:return n.next=19,(0,i.introspect)(e,{withCredentials:u,version:c,interactionHandle:g});case 19:v=n.sent;case 20:return n.abrupt("return",Object.assign(Object.assign({},t),{idxResponse:v,meta:y}));case 21:case"end":return n.stop()}}),n)})))}function g(e){return h(this,void 0,void 0,o.default.mark((function t(){var n,r,a,i,u,c,l,f,d,h,p,v;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.idxResponse,r=e.options,a=e.values,i=r.autoRemediate,u=r.remediators,c=r.actions,l=r.flow,f=r.step,!1!==i&&(u||c||f)){t.next=5;break}return t.abrupt("return",e);case 5:return a=Object.assign(Object.assign({},a),{stateHandle:n.rawIdxState.stateHandle}),t.next=8,(0,s.remediate)(n,a,{remediators:u,actions:c,flow:l,step:f});case 8:return d=t.sent,h=d.idxResponse,p=d.nextStep,v=d.canceled,n=h,t.abrupt("return",Object.assign(Object.assign({},e),{idxResponse:n,nextStep:p,canceled:v}));case 14:case"end":return t.stop()}}),t)})))}function m(e,t){return h(this,void 0,void 0,o.default.mark((function n(){var r,a,i,s,u,c,l,f,d,h;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=t.meta,a=t.idxResponse,i=a.interactionCode,s=r.clientId,u=r.codeVerifier,c=r.ignoreSignature,l=r.redirectUri,f=r.urls,d=r.scopes,n.next=5,e.token.exchangeCodeForTokens({interactionCode:i,clientId:s,codeVerifier:u,ignoreSignature:c,redirectUri:l,scopes:d},f);case 5:return h=n.sent,n.abrupt("return",h.tokens);case 7:case"end":return n.stop()}}),n)})))}function b(e,t){return h(this,void 0,void 0,o.default.mark((function n(){var r,a,i,s,u,l,f,h,p,v,y,g,b;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=t.options,a=t.idxResponse,i=t.canceled,s=t.status,u=r.exchangeCodeForTokens,l=!1,f=!0,a&&(v=(0,d.getEnabledFeatures)(a),y=(0,d.getAvailableSteps)(a),g=(0,d.getMessagesFromResponse)(a),b=(0,d.isTerminalResponse)(a)),!b){n.next=11;break}s=c.IdxStatus.TERMINAL,l=!0,f=!1,n.next=28;break;case 11:if(!i){n.next=16;break}s=c.IdxStatus.CANCELED,l=!0,n.next=28;break;case 16:if(!(null==a?void 0:a.interactionCode)){n.next=28;break}if(h=a.interactionCode,!1!==u){n.next=23;break}s=c.IdxStatus.SUCCESS,l=!1,n.next=28;break;case 23:return n.next=25,m(e,t);case 25:p=n.sent,s=c.IdxStatus.SUCCESS,l=!0;case 28:return n.abrupt("return",Object.assign(Object.assign({},t),{status:s,interactionCode:h,tokens:p,shouldClearTransaction:l,clearSharedStorage:f,enabledFeatures:v,availableSteps:y,messages:g,terminal:b}));case 29:case"end":return n.stop()}}),n)})))}function k(e,t){var n=t.error,r=t.status;t.shouldClearTransaction;if(!(0,l.isIdxResponse)(e))throw e;return n=e,r=c.IdxStatus.FAILURE,!0,Object.assign(Object.assign({},t),{error:n,status:r,shouldClearTransaction:true})}},3248:function(e,t,n){"use strict";var r=n(5318);t.startTransaction=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,void 0,void 0,o.default.mark((function n(){return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e.transactionManager.clear(),n.abrupt("return",(0,a.run)(e,Object.assign({exchangeCodeForTokens:!1},t)));case 2:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(8710),i=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}},4456:function(e,t,n){"use strict";var r=n(5318);t.createTransactionMeta=u,t.hasSavedInteractionHandle=function(e,t){var n=c(e,t);return!!(null==n?void 0:n.interactionHandle)},t.getSavedTransactionMeta=c,t.getTransactionMeta=function(e,t){return s(this,void 0,void 0,o.default.mark((function n(){var r;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=(0,a.removeNils)(t),t=Object.assign(Object.assign({},e.options),t),!(r=c(e,t))){n.next=5;break}return n.abrupt("return",r);case 5:return n.abrupt("return",u(e,t));case 6:case"end":return n.stop()}}),n)})))},t.saveTransactionMeta=function(e,t){e.transactionManager.save(t,{muteWarning:!0})},t.clearTransactionMeta=function(e){e.transactionManager.clear()},t.isTransactionMetaValid=l,t.isTransactionMetaValidForFlow=f,t.isTransactionMetaValidForOptions=d;var o=r(n(7757)),a=n(8965),i=n(6496),s=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))};function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(this,void 0,void 0,o.default.mark((function n(){var r,a,s,u,c,l,f,d,h,p,v,y;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.token.prepareTokenParams(t);case 2:return r=n.sent,a=(0,i.createOAuthMeta)(e,r),s=Object.assign(Object.assign({},e.options),t),u=s.flow,c=void 0===u?"default":u,l=s.withCredentials,f=void 0===l||l,d=s.activationToken,h=void 0===d?void 0:d,p=s.recoveryToken,v=void 0===p?void 0:p,y=Object.assign(Object.assign({},a),{flow:c,withCredentials:f,activationToken:h,recoveryToken:v}),n.abrupt("return",y);case 7:case"end":return n.stop()}}),n)})))}function c(e,t){var n;t=(0,a.removeNils)(t),t=Object.assign(Object.assign({},e.options),t);try{n=e.transactionManager.load(t)}catch(e){}if(n)return l(n,t)?n:void(0,a.warn)("Saved transaction meta does not match the current configuration. This may indicate that two apps are sharing a storage key.")}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=["issuer","clientId","redirectUri","state","codeChallenge","codeChallengeMethod","activationToken","recoveryToken"];if(!1===d(e,t,n))return!1;var r=t.flow;return!1!==f(e,r)}function f(e,t){return!(t&&"default"!==t&&"proceed"!==t)||t===e.flow}function d(e,t,n){return!n.some((function(n){var r=t[n];if(r&&r!==e[n])return!0}))}},3675:function(e,t){"use strict";function n(e){return e&&e.version}t.isRawIdxResponse=n,t.isIdxResponse=function(e){return e&&n(e.rawIdxState)}},6473:function(e,t){"use strict";var n,r,o;t.isAuthenticator=function(e){return e&&(e.key||e.id)},t.IdxFeature=t.AuthenticatorKey=t.IdxStatus=void 0,t.IdxStatus=n,function(e){e.SUCCESS="SUCCESS",e.PENDING="PENDING",e.FAILURE="FAILURE",e.TERMINAL="TERMINAL",e.CANCELED="CANCELED"}(n||(t.IdxStatus=n={})),t.AuthenticatorKey=r,function(e){e.OKTA_PASSWORD="okta_password",e.OKTA_EMAIL="okta_email",e.PHONE_NUMBER="phone_number",e.GOOGLE_AUTHENTICATOR="google_otp",e.SECURITY_QUESTION="security_question",e.OKTA_VERIFY="okta_verify",e.WEBAUTHN="webauthn"}(r||(t.AuthenticatorKey=r={})),t.IdxFeature=o,function(e){e.PASSWORD_RECOVERY="recover-password",e.REGISTRATION="enroll-profile",e.SOCIAL_IDP="redirect-idp",e.ACCOUNT_UNLOCK="unlock-account"}(o||(t.IdxFeature=o={}))},5752:function(e,t,n){"use strict";var r=n(5318);t.unlockAccount=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(this,void 0,void 0,o.default.mark((function n(){var r,l;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.flow="unlockAccount",(0,i.hasSavedInteractionHandle)(e)){n.next=8;break}return n.next=4,(0,s.startTransaction)(e,Object.assign(Object.assign({},t),{autoRemediate:!1}));case 4:if(r=n.sent,!(l=r.enabledFeatures)||l.includes(c.IdxFeature.ACCOUNT_UNLOCK)){n.next=8;break}throw new u.AuthSdkError("Self Service Account Unlock is not supported based on your current org configuration.");case 8:return n.abrupt("return",(0,a.run)(e,Object.assign({},t)));case 9:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(8710),i=n(4456),s=n(3248),u=n(5705),c=n(858),l=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}},9581:function(e,t,n){"use strict";var r=n(5318),o=n(8);t.isTerminalResponse=function(e){var t=e.neededToProceed,n=e.interactionCode;return!t.length&&!n},t.canSkipFn=function(e){return e.neededToProceed.some((function(e){return"skip"===e.name}))},t.canResendFn=function(e){return Object.keys(e.actions).some((function(e){return e.includes("resend")}))},t.getMessagesFromIdxRemediationValue=f,t.getMessagesFromResponse=function(e){var t,n=[],r=e.rawIdxState,o=e.neededToProceed,i=null===(t=r.messages)||void 0===t?void 0:t.value.map((function(e){return e}));i&&(n=[].concat((0,a.default)(n),(0,a.default)(i)));var s,u=c(o);try{for(u.s();!(s=u.n()).done;){var l=f(s.value.value);l&&(n=[].concat((0,a.default)(n),(0,a.default)(l)))}}catch(e){u.e(e)}finally{u.f()}var d={};return n=n.reduce((function(e,t){var n,r=null===(n=t.i18n)||void 0===n?void 0:n.key;return r&&d[r]?e:(d[r]=t,e=[].concat((0,a.default)(e),[t]))}),[]),n},t.getEnabledFeatures=function(e){var t=[],n=e.actions,r=e.neededToProceed;return n["currentAuthenticator-recover"]&&t.push(s.IdxFeature.PASSWORD_RECOVERY),r.some((function(e){return"select-enroll-profile"===e.name}))&&t.push(s.IdxFeature.REGISTRATION),r.some((function(e){return"redirect-idp"===e.name}))&&t.push(s.IdxFeature.SOCIAL_IDP),r.some((function(e){return"unlock-account"===e.name}))&&t.push(s.IdxFeature.ACCOUNT_UNLOCK),t},t.getAvailableSteps=function(e){var t,n=[],r=Object.values(i).reduce((function(e,t){return t.remediationName&&(e[t.remediationName]=t),e}),{}),o=c(e.neededToProceed);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=r[a.name];if(s){var u=new s(a);n.push(u.getNextStep(e.context))}}}catch(e){o.e(e)}finally{o.f()}return n},t.filterValuesForRemediation=function(e,t){return e.neededToProceed[0].value.reduce((function(e,n){var r=n.name;return e[r]=t[r],e}),{})};var a=r(n(319)),i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=a?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(6749)),s=n(6473);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e){if(e&&Array.isArray(e))return e.reduce((function(e,t){if(t.messages&&(e=[].concat((0,a.default)(e),(0,a.default)(t.messages.value))),t.form){var n=f(t.form.value)||[];e=[].concat((0,a.default)(e),(0,a.default)(n))}if(t.options){var r=[];t.options.forEach((function(e){e.value&&"string"!=typeof e.value&&(r=[].concat((0,a.default)(r),[e.value]))}));var o=f(r)||[];e=[].concat((0,a.default)(e),(0,a.default)(o))}return e}),[])}},1964:function(e,t,n){"use strict";t.decodeToken=function(e){var t,n=e.split(".");try{t={header:JSON.parse((0,o.base64UrlToString)(n[0])),payload:JSON.parse((0,o.base64UrlToString)(n[1])),signature:n[2]}}catch(e){throw new r.AuthSdkError("Malformed token")}return t};var r=n(5705),o=n(5637)},8163:function(e,t,n){"use strict";t.convertTokenParamsToOAuthParams=a,t.buildAuthorizeParams=function(e){var t=a(e);return(0,r.toQueryString)(Object.assign(Object.assign({},t),e.extraParams&&Object.assign({},e.extraParams)))};var r=n(8965),o=n(5705);function a(e){if(!e.clientId)throw new o.AuthSdkError("A clientId must be specified in the OktaAuth constructor to get a token");if((0,r.isString)(e.responseType)&&-1!==e.responseType.indexOf(" "))throw new o.AuthSdkError("Multiple OAuth responseTypes must be defined as an array");var t={client_id:e.clientId,code_challenge:e.codeChallenge,code_challenge_method:e.codeChallengeMethod,display:e.display,idp:e.idp,idp_scope:e.idpScope,login_hint:e.loginHint,max_age:e.maxAge,nonce:e.nonce,prompt:e.prompt,redirect_uri:e.redirectUri,response_mode:e.responseMode,response_type:e.responseType,sessionToken:e.sessionToken,state:e.state};if(t=(0,r.removeNils)(t),["idp_scope","response_type"].forEach((function(e){Array.isArray(t[e])&&(t[e]=t[e].join(" "))})),-1!==e.responseType.indexOf("id_token")&&-1===e.scopes.indexOf("openid"))throw new o.AuthSdkError("openid scope must be specified in the scopes argument when requesting an id_token");return t.scope=e.scopes.join(" "),t}},5074:function(e,t,n){"use strict";var r=n(8163);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(8518);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(6308);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}))},8518:function(e,t,n){"use strict";var r=n(5318);t.postToTokenEndpoint=function(e,t,n){!function(e){if(!e.clientId)throw new a.AuthSdkError("A clientId must be specified in the OktaAuth constructor to get a token");if(!e.redirectUri)throw new a.AuthSdkError("The redirectUri passed to /authorize must also be passed to /token");if(!e.authorizationCode&&!e.interactionCode)throw new a.AuthSdkError("An authorization code (returned from /authorize) must be passed to /token");if(!e.codeVerifier)throw new a.AuthSdkError('The "codeVerifier" (generated and saved by your app) must be passed to /token')}(t);var r=function(e,t){var n=(0,i.removeNils)({client_id:t.clientId,redirect_uri:t.redirectUri,grant_type:t.interactionCode?"interaction_code":"authorization_code",code_verifier:t.codeVerifier});t.interactionCode?n.interaction_code=t.interactionCode:t.authorizationCode&&(n.code=t.authorizationCode);var r=e.options.clientSecret;return r&&(n.client_secret=r),(0,i.toQueryString)(n).slice(1)}(e,t);return(0,s.httpRequest)(e,{url:n.tokenUrl,method:"POST",args:r,headers:{"Content-Type":"application/x-www-form-urlencoded"}})},t.postRefreshToken=function(e,t,n){return(0,s.httpRequest)(e,{url:n.tokenUrl,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},args:Object.entries({client_id:t.clientId,grant_type:"refresh_token",scope:n.scopes.join(" "),refresh_token:n.refreshToken}).map((function(e){var t=(0,o.default)(e,2),n=t[0],r=t[1];return n+"="+encodeURIComponent(r)})).join("&")})};var o=r(n(3038)),a=n(5705),i=n(8965),s=n(2924)},6308:function(e,t,n){"use strict";var r=n(5318);t.getWellKnown=s,t.getKey=function(e,t,n){var r=e.storageManager.getHttpCache(e.options.cookies);return s(e,t).then((function(t){var s=t.jwks_uri,u=r.getStorage()[s];if(u&&Date.now()/1e3<u.expiresAt){var c=(0,a.find)(u.response.keys,{kid:n});if(c)return c}return r.clearStorage(s),(0,o.get)(e,s,{cacheResponse:!0}).then((function(e){var t=(0,a.find)(e.keys,{kid:n});if(t)return t;throw new i.default("The key id, "+n+", was not found in the server's keys")}))}))};var o=n(2924),a=n(8965),i=r(n(7948));function s(e,t){var n=t||e.options.issuer;return(0,o.get)(e,n+"/.well-known/openid-configuration",{cacheResponse:!0})}},9732:function(e,t,n){"use strict";t.exchangeCodeForTokens=function(e,t,n){n=n||(0,r.getOAuthUrls)(e,t);var s=t=Object.assign({},(0,r.getDefaultTokenParams)(e),(0,o.clone)(t)),u=s.authorizationCode,c=s.interactionCode,l=s.codeVerifier,f=s.clientId,d=s.redirectUri,h=s.scopes,p=s.ignoreSignature,v=s.state,y={clientId:f,redirectUri:d,authorizationCode:u,interactionCode:c,codeVerifier:l};return(0,a.postToTokenEndpoint)(e,y,n).then((function(t){var r=["token"];-1!==h.indexOf("openid")&&r.push("id_token");var o={clientId:f,redirectUri:d,scopes:h,responseType:r,ignoreSignature:p};return(0,i.handleOAuthResponse)(e,o,t,n).then((function(e){return e.code=u,e.state=v,e}))})).finally((function(){e.transactionManager.clear()}))};var r=n(4736),o=n(8965),a=n(8518),i=n(8723)},5884:function(e,t,n){"use strict";var r=n(5318);t.getToken=function(e,t){if(arguments.length>2)return Promise.reject(new a.default('As of version 3.0, "getToken" takes only a single set of options'));var n=(t=t||{}).popupWindow;return t.popupWindow=void 0,(0,i.prepareTokenParams)(e,t).then((function(r){var i,c;switch(t.sessionToken?Object.assign(r,{prompt:"none",responseMode:"okta_post_message",display:null}):t.idp&&Object.assign(r,{display:"popup"}),c=(0,o.getOAuthUrls)(e,r),i=(t.codeVerifier?c.tokenUrl:c.authorizeUrl)+(0,s.buildAuthorizeParams)(r),r.sessionToken||null===r.display?"IFRAME":"popup"===r.display?"POPUP":"IMPLICIT"){case"IFRAME":var l=(0,o.addPostMessageListener)(e,t.timeout,r.state),f=(0,o.loadFrame)(i);return l.then((function(t){return(0,u.handleOAuthResponse)(e,r,t,c)})).finally((function(){var e;document.body.contains(f)&&(null===(e=f.parentElement)||void 0===e||e.removeChild(f))}));case"POPUP":var d;if("okta_post_message"===r.responseMode){if(!e.features.isPopupPostMessageSupported())throw new a.default("This browser doesn't have full postMessage support");d=(0,o.addPostMessageListener)(e,t.timeout,r.state)}return n&&n.location.assign(i),new Promise((function(e,t){var r=setInterval((function(){n&&!n.closed||(clearInterval(r),t(new a.default("Unable to parse OAuth flow response")))}),100);d.then((function(t){clearInterval(r),e(t)})).catch((function(e){clearInterval(r),t(e)}))})).then((function(t){return(0,u.handleOAuthResponse)(e,r,t,c)})).finally((function(){n&&!n.closed&&n.close()}));default:throw new a.default("The full page redirect flow is not supported")}}))};var o=n(4736),a=r(n(7948)),i=n(3584),s=n(8163),u=n(8723)},457:function(e,t,n){"use strict";var r=n(5318);t.getUserInfo=function(e,t,n){return c(this,void 0,void 0,o.default.mark((function r(){return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t){r.next=4;break}return r.next=3,e.tokenManager.getTokens();case 3:t=r.sent.accessToken;case 4:if(n){r.next=8;break}return r.next=7,e.tokenManager.getTokens();case 7:n=r.sent.idToken;case 8:if(t&&(0,u.isAccessToken)(t)){r.next=10;break}return r.abrupt("return",Promise.reject(new i.AuthSdkError("getUserInfo requires an access token object")));case 10:if(n&&(0,u.isIDToken)(n)){r.next=12;break}return r.abrupt("return",Promise.reject(new i.AuthSdkError("getUserInfo requires an ID token object")));case 12:return r.abrupt("return",(0,s.httpRequest)(e,{url:t.userinfoUrl,method:"GET",accessToken:t.accessToken}).then((function(e){return e.sub===n.claims.sub?e:Promise.reject(new i.AuthSdkError("getUserInfo request was rejected due to token mismatch"))})).catch((function(e){var t;if(e.xhr&&(401===e.xhr.status||403===e.xhr.status)&&(e.xhr.headers&&(0,a.isFunction)(e.xhr.headers.get)&&e.xhr.headers.get("WWW-Authenticate")?t=e.xhr.headers.get("WWW-Authenticate"):(0,a.isFunction)(e.xhr.getResponseHeader)&&(t=e.xhr.getResponseHeader("WWW-Authenticate")),t)){var n=t.match(/error="(.*?)"/)||[],r=t.match(/error_description="(.*?)"/)||[],o=n[1],s=r[1];o&&s&&(e=new i.OAuthError(o,s))}throw e})));case 13:case"end":return r.stop()}}),r)})))};var o=r(n(7757)),a=n(8965),i=n(5705),s=n(2924),u=n(858),c=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}},941:function(e,t,n){"use strict";t.getWithPopup=function(e,t){if(arguments.length>2)return Promise.reject(new r.AuthSdkError('As of version 3.0, "getWithPopup" takes only a single set of options'));var n=(0,i.loadPopup)("/",t);return t=(0,o.clone)(t)||{},Object.assign(t,{display:"popup",responseMode:"okta_post_message",popupWindow:n}),(0,a.getToken)(e,t)};var r=n(5705),o=n(8965),a=n(5884),i=n(4736)},1081:function(e,t,n){"use strict";var r=n(5318);t.getWithRedirect=function(e,t){return c(this,arguments,void 0,o.default.mark((function n(){var r,c,l,f=arguments;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(f.length>2)){n.next=2;break}return n.abrupt("return",Promise.reject(new a.AuthSdkError('As of version 3.0, "getWithRedirect" takes only a single set of options')));case 2:return t=(0,i.clone)(t)||{},n.next=5,(0,s.prepareTokenParams)(e,t);case 5:r=n.sent,c=(0,s.createOAuthMeta)(e,r),l=c.urls.authorizeUrl+(0,u.buildAuthorizeParams)(r),e.transactionManager.save(c,{oauth:!0}),e.token.getWithRedirect._setLocation(l);case 10:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(5705),i=n(8965),s=n(4736),u=n(8163),c=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}},73:function(e,t,n){"use strict";t.getWithoutPrompt=function(e,t){return arguments.length>2?Promise.reject(new r.AuthSdkError('As of version 3.0, "getWithoutPrompt" takes only a single set of options')):(t=(0,o.clone)(t)||{},Object.assign(t,{prompt:"none",responseMode:"okta_post_message",display:null}),(0,a.getToken)(e,t))};var r=n(5705),o=n(8965),a=n(5884)},8723:function(e,t,n){"use strict";var r=n(5318);t.handleOAuthResponse=function(e,t,n,r){return f(this,void 0,void 0,o.default.mark((function f(){var h,p,v,y,g,m,b,k,w,O,E,S,T,_;return o.default.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(!1===e.options.pkce||!n.code&&!n.interaction_code){o.next=3;break}return o.abrupt("return",(0,u.exchangeCodeForTokens)(e,Object.assign({},t,{authorizationCode:n.code,interactionCode:n.interaction_code}),r));case 3:if(t=t||(0,l.getDefaultTokenParams)(e),r=r||(0,i.getOAuthUrls)(e,t),h=t.responseType||[],Array.isArray(h)||(h=[h]),p=n.scope?n.scope.split(" "):(0,a.clone)(t.scopes),v=t.clientId||e.options.clientId,d(n,t),y={},g=n.expires_in,m=n.token_type,b=n.access_token,k=n.id_token,w=n.refresh_token,O=Math.floor(Date.now()/1e3),b&&(E=e.token.decode(b),y.accessToken={accessToken:b,claims:E.payload,expiresAt:Number(g)+O,tokenType:m,scopes:p,authorizeUrl:r.authorizeUrl,userinfoUrl:r.userinfoUrl}),w&&(y.refreshToken={refreshToken:w,expiresAt:Number(g)+O,scopes:p,tokenUrl:r.tokenUrl,authorizeUrl:r.authorizeUrl,issuer:r.issuer}),!k){o.next=27;break}return S=e.token.decode(k),T={idToken:k,claims:S.payload,expiresAt:S.payload.exp-S.payload.iat+O,scopes:p,authorizeUrl:r.authorizeUrl,issuer:r.issuer,clientId:v},_={clientId:v,issuer:r.issuer,nonce:t.nonce,accessToken:b},void 0!==t.ignoreSignature&&(_.ignoreSignature=t.ignoreSignature),o.next=26,(0,c.verifyToken)(e,T,_);case 26:y.idToken=T;case 27:if(-1===h.indexOf("token")||y.accessToken){o.next=29;break}throw new s.AuthSdkError('Unable to parse OAuth flow response: response type "token" was requested but "access_token" was not returned.');case 29:if(-1===h.indexOf("id_token")||y.idToken){o.next=31;break}throw new s.AuthSdkError('Unable to parse OAuth flow response: response type "id_token" was requested but "id_token" was not returned.');case 31:return o.abrupt("return",{tokens:y,state:n.state,code:n.code});case 32:case"end":return o.stop()}}),f)})))};var o=r(n(7757)),a=n(8965),i=n(588),s=n(5705),u=n(9732),c=n(805),l=n(4736),f=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))};function d(e,t){if(e.error&&e.error_description)throw new s.OAuthError(e.error,e.error_description);if(e.state!==t.state)throw new s.AuthSdkError("OAuth flow response state doesn't match request state")}},6496:function(e,t,n){"use strict";var r={decodeToken:!0,revokeToken:!0,renewToken:!0,renewTokensWithRefresh:!0,renewTokens:!0,verifyToken:!0,getUserInfo:!0,handleOAuthResponse:!0,exchangeCodeForTokens:!0,getToken:!0,getWithoutPrompt:!0,getWithPopup:!0,getWithRedirect:!0,parseFromUrl:!0};Object.defineProperty(t,"decodeToken",{enumerable:!0,get:function(){return i.decodeToken}}),Object.defineProperty(t,"revokeToken",{enumerable:!0,get:function(){return s.revokeToken}}),Object.defineProperty(t,"renewToken",{enumerable:!0,get:function(){return u.renewToken}}),Object.defineProperty(t,"renewTokensWithRefresh",{enumerable:!0,get:function(){return c.renewTokensWithRefresh}}),Object.defineProperty(t,"renewTokens",{enumerable:!0,get:function(){return l.renewTokens}}),Object.defineProperty(t,"verifyToken",{enumerable:!0,get:function(){return f.verifyToken}}),Object.defineProperty(t,"getUserInfo",{enumerable:!0,get:function(){return d.getUserInfo}}),Object.defineProperty(t,"handleOAuthResponse",{enumerable:!0,get:function(){return h.handleOAuthResponse}}),Object.defineProperty(t,"exchangeCodeForTokens",{enumerable:!0,get:function(){return p.exchangeCodeForTokens}}),Object.defineProperty(t,"getToken",{enumerable:!0,get:function(){return v.getToken}}),Object.defineProperty(t,"getWithoutPrompt",{enumerable:!0,get:function(){return y.getWithoutPrompt}}),Object.defineProperty(t,"getWithPopup",{enumerable:!0,get:function(){return g.getWithPopup}}),Object.defineProperty(t,"getWithRedirect",{enumerable:!0,get:function(){return m.getWithRedirect}}),Object.defineProperty(t,"parseFromUrl",{enumerable:!0,get:function(){return b.parseFromUrl}});var o=n(5074);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(4736);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(1964),s=n(9400),u=n(1735),c=n(9201),l=n(8273),f=n(805),d=n(457),h=n(8723),p=n(9732),v=n(5884),y=n(73),g=n(941),m=n(1081),b=n(5037)},5037:function(e,t,n){"use strict";var r=n(5318);t.getResponseMode=l,t.parseOAuthResponseFromUrl=f,t.cleanOAuthResponseFromUrl=d,t.parseFromUrl=function(e,t){return c(this,void 0,void 0,o.default.mark((function n(){var r,c,l,h;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=t||{},t=(0,s.isString)(t)?{url:t}:t,r=f(e,t),c=r.state,l=e.transactionManager.load({oauth:!0,pkce:e.options.pkce,state:c})){n.next=7;break}return n.abrupt("return",Promise.reject(new a.AuthSdkError("Unable to retrieve OAuth redirect params from storage")));case 7:return h=l.urls,delete l.urls,t.url||d(e,t),n.abrupt("return",(0,u.handleOAuthResponse)(e,l,r,h).catch((function(t){throw(0,i.isInteractionRequiredError)(t)||e.transactionManager.clear({state:c}),t})).then((function(t){return e.transactionManager.clear({state:c}),t})));case 11:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(5705),i=n(4736),s=n(8965),u=n(8723),c=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))};function l(e){var t=e.options.pkce?"query":"fragment";return e.options.responseMode||t}function f(e,t){t=t||{};var n,r=(t=(0,s.isString)(t)?{url:t}:t).url,o=t.responseMode||l(e),u=e.token.parseFromUrl._getLocation();if(!(n="query"===o?r?r.substring(r.indexOf("?")):u.search:r?r.substring(r.indexOf("#")):u.hash))throw new a.AuthSdkError("Unable to parse a token from the url");return(0,i.urlParamsToObject)(n)}function d(e,t){"query"===(t.responseMode||l(e))?function(e){var t=e.token.parseFromUrl._getHistory(),n=e.token.parseFromUrl._getDocument(),r=e.token.parseFromUrl._getLocation();t&&t.replaceState?t.replaceState(null,n.title,r.pathname+r.hash):r.search=""}(e):function(e){var t=e.token.parseFromUrl._getHistory(),n=e.token.parseFromUrl._getDocument(),r=e.token.parseFromUrl._getLocation();t&&t.replaceState?t.replaceState(null,n.title,r.pathname+r.search):r.hash=""}(e)}},1735:function(e,t,n){"use strict";var r=n(5318);t.renewToken=function(e,t){return c(this,void 0,void 0,o.default.mark((function n(){var r,a,c,d,h,p;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if((0,i.isIDToken)(t)||(0,i.isAccessToken)(t)||l(),!(r=e.tokenManager.getTokensSync()).refreshToken){n.next=7;break}return n.next=5,(0,u.renewTokensWithRefresh)(e,{scopes:t.scopes},r.refreshToken);case 5:return r=n.sent,n.abrupt("return",f(t,r));case 7:return a=e.options.pkce?"code":(0,i.isAccessToken)(t)?"token":"id_token",c=t.scopes,d=t.authorizeUrl,h=t.userinfoUrl,p=t.issuer,n.abrupt("return",(0,s.getWithoutPrompt)(e,{responseType:a,scopes:c,authorizeUrl:d,userinfoUrl:h,issuer:p}).then((function(e){return f(t,e.tokens)})));case 10:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(5705),i=n(858),s=n(73),u=n(9201),c=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))};function l(){throw new a.AuthSdkError("Renew must be passed a token with an array of scopes and an accessToken or idToken")}function f(e,t){return(0,i.isIDToken)(e)?t.idToken:(0,i.isAccessToken)(e)?t.accessToken:void l()}},8273:function(e,t,n){"use strict";var r=n(5318);t.renewTokens=function(e,t){return c(this,void 0,void 0,o.default.mark((function n(){var r,c,l,f,d,h,p,v,y;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(r=e.tokenManager.getTokensSync()).refreshToken){n.next=3;break}return n.abrupt("return",(0,s.renewTokensWithRefresh)(e,t||{},r.refreshToken));case 3:if(r.accessToken||r.idToken){n.next=5;break}throw new a.AuthSdkError("renewTokens() was called but there is no existing token");case 5:if(c=r.accessToken||{},l=r.idToken||{},f=c.scopes||l.scopes){n.next=10;break}throw new a.AuthSdkError("renewTokens: invalid tokens: could not read scopes");case 10:if(d=c.authorizeUrl||l.authorizeUrl){n.next=13;break}throw new a.AuthSdkError("renewTokens: invalid tokens: could not read authorizeUrl");case 13:return h=c.userinfoUrl||e.options.userinfoUrl,p=l.issuer||e.options.issuer,t=Object.assign({scopes:f,authorizeUrl:d,userinfoUrl:h,issuer:p},t),e.options.pkce?t.responseType="code":(v=(0,u.getDefaultTokenParams)(e),y=v.responseType,t.responseType=y),n.abrupt("return",(0,i.getWithoutPrompt)(e,t).then((function(e){return e.tokens})));case 18:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(5705),i=n(73),s=n(9201),u=n(4736),c=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}},9201:function(e,t,n){"use strict";var r=n(5318);t.renewTokensWithRefresh=function(e,t,n){return l(this,void 0,void 0,o.default.mark((function r(){var l,f,d,h,p,v,y;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(l=e.options.clientId){r.next=3;break}throw new a.AuthSdkError("A clientId must be specified in the OktaAuth constructor to renew tokens");case 3:return f=Object.assign({},t,{clientId:l}),r.next=6,(0,c.postRefreshToken)(e,f,n);case 6:return d=r.sent,h=(0,i.getOAuthUrls)(e,t),r.next=10,(0,u.handleOAuthResponse)(e,f,d,h);case 10:return p=r.sent,v=p.tokens,(y=v.refreshToken)&&!(0,s.isSameRefreshToken)(y,n)&&e.tokenManager.updateRefreshToken(y),r.abrupt("return",v);case 15:case"end":return r.stop()}}),r)})))};var o=r(n(7757)),a=n(5705),i=n(588),s=n(9849),u=n(8723),c=n(8518),l=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}},9400:function(e,t,n){"use strict";var r=n(5318);t.revokeToken=function(e,t){return l(this,void 0,void 0,o.default.mark((function n(){var r,l,f,d,h,p,v;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r="",l="",t&&(r=t.accessToken,l=t.refreshToken),r||l){n.next=5;break}throw new c.default("A valid access or refresh token object is required");case 5:if(f=e.options.clientId,d=e.options.clientSecret,f){n.next=9;break}throw new c.default("A clientId must be specified in the OktaAuth constructor to revoke a token");case 9:return h=(0,s.getOAuthUrls)(e).revokeUrl,p=(0,i.toQueryString)({token_type_hint:l?"refresh_token":"access_token",token:l||r}).slice(1),v=d?(0,u.btoa)("".concat(f,":").concat(d)):(0,u.btoa)(f),n.abrupt("return",(0,a.post)(e,h,p,{headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Basic "+v}}));case 13:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(2924),i=n(8965),s=n(588),u=n(5637),c=r(n(7948)),l=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}},6650:function(e,t,n){"use strict";t.addListener=o,t.removeListener=a,t.loadFrame=function(e){var t=document.createElement("iframe");return t.style.display="none",t.src=e,document.body.appendChild(t)},t.loadPopup=function(e,t){var n=t.popupTitle||"External Identity Provider User Authentication";return window.open(e,n,"toolbar=no, scrollbars=yes, resizable=yes, top=100, left=500, width=600, height=600")},t.addPostMessageListener=function(e,t,n){var i,s;return new Promise((function(a,u){i=function(t){if(t.data&&t.data.state===n)return t.origin!==e.getIssuerOrigin()?u(new r.AuthSdkError("The request does not match client configuration")):void a(t.data)},o(window,"message",i),s=setTimeout((function(){u(new r.AuthSdkError("OAuth flow timed out"))}),t||12e4)})).finally((function(){clearTimeout(s),a(window,"message",i)}))};var r=n(5705);function o(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent("on"+t,n)}function a(e,t,n){e.removeEventListener?e.removeEventListener(t,n):e.detachEvent("on"+t,n)}},6588:function(e,t,n){"use strict";t.getDefaultTokenParams=function(e){var t=e.options,n=t.pkce,i=t.clientId,s=t.redirectUri,u=t.responseType,c=t.responseMode,l=t.scopes,f=t.state,d=t.ignoreSignature,h=(0,o.isBrowser)()?window.location.href:void 0;return(0,a.removeNils)({pkce:n,clientId:i,redirectUri:s||h,responseType:u||["token","id_token"],responseMode:c,state:f||(0,r.generateState)(),nonce:(0,r.generateNonce)(),scopes:l||["openid","email"],ignoreSignature:d})};var r=n(588),o=n(9426),a=n(8965)},6093:function(e,t){"use strict";t.isInteractionRequiredError=function(e){return"OAuthError"===e.name&&"interaction_required"===e.errorCode},t.isAuthorizationCodeError=function(e,t){if("AuthApiError"!==t.name)return!1;var n=t.xhr,r=null==n?void 0:n.responseJSON;return e.options.pkce&&"invalid_grant"===(null==r?void 0:r.error)}},4736:function(e,t,n){"use strict";var r=n(5318),o={pkce:!0};Object.defineProperty(t,"pkce",{enumerable:!0,get:function(){return f.default}});var a=n(6650);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(6588);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=n(6093);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=n(9244);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=n(588);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=n(3769);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var f=r(n(6973)),d=n(3584);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var h=n(9849);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=n(7724);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var v=n(3385);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===v[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}}))}));var y=n(8031);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===y[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}}))}))},9244:function(e,t){"use strict";function n(e){return/((id|access)_token=)/i.test(e)}function r(e){return/(code=)/i.test(e)}function o(e){return/(interaction_code=)/i.test(e)}function a(e){return/(error=)/i.test(e)||/(error_description)/i.test(e)}function i(e,t){var n=t.options;return!(!e||!n.redirectUri)&&0===e.indexOf(n.redirectUri)}function s(e){return e.pkce||"code"===e.responseType||"query"===e.responseMode}function u(e){return s(e)&&"fragment"!==e.responseMode?window.location.search:window.location.hash}function c(e){if(!i(window.location.href,e))return!1;var t=s(e.options),c=u(e.options);return!!a(c)||(t?r(c)||o(c):n(window.location.hash))}t.hasTokensInHash=n,t.hasAuthorizationCode=r,t.hasInteractionCode=o,t.hasErrorInUrl=a,t.isRedirectUri=i,t.isCodeFlow=s,t.getHashOrSearch=u,t.isLoginRedirect=c,t.isInteractionRequired=function(e,t){if(!t){if(!c(e))return!1;t=u(e.options)}return/(error=interaction_required)/i.test(t)}},588:function(e,t,n){"use strict";var r=n(5318);t.generateState=function(){return(0,o.genRandomString)(64)},t.generateNonce=function(){return(0,o.genRandomString)(64)},t.getOAuthBaseUrl=s,t.getOAuthDomain=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i(e,t),r=n.split("/oauth2")[0];return r},t.getOAuthUrls=function(e,t){if(arguments.length>2)throw new a.default('As of version 3.0, "getOAuthUrls" takes only a single set of options');t=t||{};var n=(0,o.removeTrailingSlash)(t.authorizeUrl)||e.options.authorizeUrl,r=i(e,t),u=(0,o.removeTrailingSlash)(t.userinfoUrl)||e.options.userinfoUrl,c=(0,o.removeTrailingSlash)(t.tokenUrl)||e.options.tokenUrl,l=(0,o.removeTrailingSlash)(t.logoutUrl)||e.options.logoutUrl,f=(0,o.removeTrailingSlash)(t.revokeUrl)||e.options.revokeUrl,d=s(e,t);return{issuer:r,authorizeUrl:n=n||d+"/v1/authorize",userinfoUrl:u=u||d+"/v1/userinfo",tokenUrl:c=c||d+"/v1/token",revokeUrl:f=f||d+"/v1/revoke",logoutUrl:l=l||d+"/v1/logout"}};var o=n(8965),a=r(n(7948));function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,o.removeTrailingSlash)(t.issuer)||e.options.issuer;return n}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i(e,t),r=n.indexOf("/oauth2")>0?n:n+"/oauth2";return r}},3769:function(e,t,n){"use strict";t.createOAuthMeta=function(e,t){var n={issuer:e.options.issuer,urls:(0,r.getOAuthUrls)(e,t),clientId:t.clientId,redirectUri:t.redirectUri,responseType:t.responseType,responseMode:t.responseMode,scopes:t.scopes,state:t.state,nonce:t.nonce,ignoreSignature:t.ignoreSignature};return!1===t.pkce?n:Object.assign(Object.assign({},n),{codeVerifier:t.codeVerifier,codeChallengeMethod:t.codeChallengeMethod,codeChallenge:t.codeChallenge})};var r=n(588)},6973:function(e,t,n){"use strict";t.default=void 0;var r=n(5637),o=n(3754);function a(e){return("0"+e.toString(16)).substr(-2)}var i={DEFAULT_CODE_CHALLENGE_METHOD:o.DEFAULT_CODE_CHALLENGE_METHOD,generateVerifier:function(e){var t,n,i=e||"";return i.length<o.MIN_VERIFIER_LENGTH&&(i+=(t=o.MIN_VERIFIER_LENGTH-i.length,n=new Uint8Array(Math.ceil(t/2)),r.webcrypto.getRandomValues(n),Array.from(n,a).join("").slice(0,t))),encodeURIComponent(i).slice(0,o.MAX_VERIFIER_LENGTH)},computeChallenge:function(e){var t=(new TextEncoder).encode(e);return r.webcrypto.subtle.digest("SHA-256",t).then((function(e){var t=String.fromCharCode.apply(null,new Uint8Array(e));return(0,r.stringToBase64Url)(t)}))}};t.default=i,e.exports=t.default},3584:function(e,t,n){"use strict";var r=n(5318);t.assertPKCESupport=f,t.validateCodeChallengeMethod=d,t.preparePKCE=h,t.prepareTokenParams=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(this,void 0,void 0,o.default.mark((function n(){var r;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=(0,s.getDefaultTokenParams)(e),!1!==(t=Object.assign(Object.assign({},r),t)).pkce){n.next=4;break}return n.abrupt("return",t);case 4:return n.abrupt("return",h(e,t));case 5:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(6308),i=n(5705),s=n(6588),u=n(3754),c=r(n(6973)),l=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))};function f(e){if(!e.features.isPKCESupported()){var t="PKCE requires a modern browser with encryption support running in a secure context.";throw e.features.isHTTPS()||(t+="\nThe current page is not being served with HTTPS protocol. PKCE requires secure HTTPS protocol."),e.features.hasTextEncoder()||(t+='\n"TextEncoder" is not defined. To use PKCE, you may need to include a polyfill/shim for this browser.'),new i.AuthSdkError(t)}}function d(e,t){return l(this,void 0,void 0,o.default.mark((function n(){return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=t||e.options.codeChallengeMethod||u.DEFAULT_CODE_CHALLENGE_METHOD,n.next=3,(0,a.getWellKnown)(e);case 3:if(-1!==(n.sent.code_challenge_methods_supported||[]).indexOf(t)){n.next=7;break}throw new i.AuthSdkError("Invalid code_challenge_method");case 7:return n.abrupt("return",t);case 8:case"end":return n.stop()}}),n)})))}function h(e,t){return l(this,void 0,void 0,o.default.mark((function n(){var r,a,i,s;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=(r=t).codeVerifier,i=r.codeChallenge,s=r.codeChallengeMethod,i=i||e.options.codeChallenge){n.next=8;break}return f(e),a=a||c.default.generateVerifier(),n.next=7,c.default.computeChallenge(a);case 7:i=n.sent;case 8:return n.next=10,d(e,s);case 10:return s=n.sent,t=Object.assign(Object.assign({},t),{responseType:"code",codeVerifier:a,codeChallenge:i,codeChallengeMethod:s}),n.abrupt("return",t);case 13:case"end":return n.stop()}}),n)})))}},9849:function(e,t,n){"use strict";t.isSameRefreshToken=function(e,t){return e.refreshToken===t.refreshToken},t.isRefreshTokenError=function(e){return!!(0,r.isAuthApiError)(e)&&(!(!e.xhr||!e.xhr.responseJSON)&&"invalid_grant"===e.xhr.responseJSON.error)};var r=n(5705)},7724:function(e,t){"use strict";t.urlParamsToObject=function(e){var t=/\+/g,n=/([^&=]+)=?([^&]*)/g,r=e||"";"#"===r.charAt(0)&&"/"===r.charAt(1)&&(r=r.substring(2)),"#"!==r.charAt(0)&&"?"!==r.charAt(0)||(r=r.substring(1));for(var o,a={};o=n.exec(r);){var i=o[1],s=o[2];a[i]="id_token"===i||"access_token"===i||"code"===i?s:decodeURIComponent(s.replace(t," "))}return a}},3385:function(e,t,n){"use strict";var r=n(5318);t.validateClaims=function(e,t,n){var r=n.clientId,a=n.issuer,i=n.nonce;if(!t||!a||!r)throw new o.default("The jwt, iss, and aud arguments are all required");if(i&&t.nonce!==i)throw new o.default("OAuth flow response nonce doesn't match request nonce");var s=Math.floor(Date.now()/1e3);if(t.iss!==a)throw new o.default("The issuer ["+t.iss+"] does not match ["+a+"]");if(t.aud!==r)throw new o.default("The audience ["+t.aud+"] does not match ["+r+"]");if(t.iat>t.exp)throw new o.default("The JWT expired before it was issued");if(!e.options.ignoreLifetime){if(s-e.options.maxClockSkew>t.exp)throw new o.default("The JWT expired and is no longer valid");if(t.iat>s+e.options.maxClockSkew)throw new o.default("The JWT was issued in the future")}};var o=r(n(7948))},8031:function(e,t,n){"use strict";t.validateToken=function(e,t){if(!(0,o.isIDToken)(e)&&!(0,o.isAccessToken)(e)&&!(0,o.isRefreshToken)(e))throw new r.AuthSdkError("Token must be an Object with scopes, expiresAt, and one of: an idToken, accessToken, or refreshToken property");if("accessToken"===t&&!(0,o.isAccessToken)(e))throw new r.AuthSdkError("invalid accessToken");if("idToken"===t&&!(0,o.isIDToken)(e))throw new r.AuthSdkError("invalid idToken");if("refreshToken"===t&&!(0,o.isRefreshToken)(e))throw new r.AuthSdkError("invalid refreshToken")};var r=n(5705),o=n(858)},805:function(e,t,n){"use strict";var r=n(5318),o=n(8);t.verifyToken=function(e,t,n){return d(this,void 0,void 0,a.default.mark((function r(){var o,f,d,h,p,v;return a.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t&&t.idToken){r.next=2;break}throw new u.AuthSdkError("Only idTokens may be verified");case 2:return o=(0,c.decodeToken)(t.idToken),f=(null==n?void 0:n.issuer)||e.options.issuer,r.next=6,(0,i.getWellKnown)(e,f);case 6:if(d=r.sent,h=d.issuer,p=Object.assign({clientId:e.options.clientId,ignoreSignature:e.options.ignoreSignature},n,{issuer:h}),(0,s.validateClaims)(e,o.payload,p),1!=p.ignoreSignature&&e.features.isTokenVerifySupported()){r.next=12;break}return r.abrupt("return",t);case 12:return r.next=14,(0,i.getKey)(e,t.issuer,o.header.kid);case 14:return v=r.sent,r.next=17,l.verifyToken(t.idToken,v);case 17:if(r.sent){r.next=20;break}throw new u.AuthSdkError("The token signature is not valid");case 20:if(!(n&&n.accessToken&&t.claims.at_hash)){r.next=26;break}return r.next=23,l.getOidcHash(n.accessToken);case 23:if(r.sent===t.claims.at_hash){r.next=26;break}throw new u.AuthSdkError("Token hash verification failed");case 26:return r.abrupt("return",t);case 27:case"end":return r.stop()}}),r)})))};var a=r(n(7757)),i=n(6308),s=n(4736),u=n(5705),c=n(1964),l=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=a?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(5637));function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}var d=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}u((r=r.apply(e,t||[])).next())}))}},2133:function(e,t,n){"use strict";var r=n(5318);t.getDefaultOptions=h,t.buildOptions=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.assertValidConfig)(e),e=p(h(),e),(0,o.removeNils)({issuer:(0,o.removeTrailingSlash)(e.issuer),tokenUrl:(0,o.removeTrailingSlash)(e.tokenUrl),authorizeUrl:(0,o.removeTrailingSlash)(e.authorizeUrl),userinfoUrl:(0,o.removeTrailingSlash)(e.userinfoUrl),revokeUrl:(0,o.removeTrailingSlash)(e.revokeUrl),logoutUrl:(0,o.removeTrailingSlash)(e.logoutUrl),clientId:e.clientId,redirectUri:e.redirectUri,state:e.state,scopes:e.scopes,postLogoutRedirectUri:e.postLogoutRedirectUri,responseMode:e.responseMode,responseType:e.responseType,pkce:!1!==e.pkce,useInteractionCodeFlow:e.useInteractionCodeFlow,httpRequestClient:e.httpRequestClient,transformErrorXHR:e.transformErrorXHR,transformAuthState:e.transformAuthState,restoreOriginalUri:e.restoreOriginalUri,storageUtil:e.storageUtil,headers:e.headers,devMode:!!e.devMode,storageManager:e.storageManager,transactionManager:e.transactionManager,cookies:(0,c.isBrowser)()?d(e,(0,c.isHTTPS)()):e.cookies,flow:e.flow,codeChallenge:e.codeChallenge,codeChallengeMethod:e.codeChallengeMethod,recoveryToken:e.recoveryToken,activationToken:e.activationToken,ignoreSignature:!!e.ignoreSignature,clientSecret:e.clientSecret})};var o=n(8965),a=n(6862),i=r(n(4888)),s=r(n(7501)),u=r(n(5879)),c=n(9426),l={token:{storageTypes:["localStorage","sessionStorage","cookie"]},cache:{storageTypes:["localStorage","sessionStorage","cookie"]},transaction:{storageTypes:["sessionStorage","localStorage","cookie"]},"shared-transaction":{storageTypes:["localStorage"]},"original-uri":{storageTypes:["localStorage"]}},f={token:{storageTypes:["memory"]},cache:{storageTypes:["memory"]},transaction:{storageTypes:["memory"]}};function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e.cookies||{};return void 0===n.secure&&(n.secure=t),void 0===n.sameSite&&(n.sameSite=n.secure?"none":"lax"),n.secure&&!t&&((0,o.warn)('The current page is not being served with the HTTPS protocol.\nFor security reasons, we strongly recommend using HTTPS.\nIf you cannot use HTTPS, set "cookies.secure" option to false.'),n.secure=!1),"none"!==n.sameSite||n.secure||(n.sameSite="lax"),n}function h(){var e;e=(0,c.isBrowser)()?Object.assign({},s.default,{inMemoryStore:{}}):u.default;var t=(0,c.isBrowser)()?l:f,n=!!(0,c.isBrowser)();return{devMode:!1,httpRequestClient:i.default,storageUtil:e,storageManager:t,transactionManager:{enableSharedStorage:n}}}function p(e,t){return Object.assign({},e,(0,o.removeNils)(t),{storageManager:Object.assign({},e.storageManager,t.storageManager),transactionManager:Object.assign({},e.transactionManager,t.transactionManager)})}},5879:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(321)),s=n(5705),u="function"==typeof i.default?new i.default:null,c=function(){function e(t){(0,o.default)(this,e),this.nodeCache=t}return(0,a.default)(e,[{key:"set",value:function(e,t,n){if(Date.parse(n)){var r=(Date.parse(n)-Date.now())/1e3;this.nodeCache.set(e,t,r)}else this.nodeCache.set(e,t);return this.get(e)}},{key:"get",value:function(e){return this.nodeCache.get(e)}},{key:"delete",value:function(e){return this.nodeCache.del(e)}}]),e}(),l=new(function(){function e(t){(0,o.default)(this,e),this.nodeCache=t,this.storage=new c(t)}return(0,a.default)(e,[{key:"testStorageType",value:function(e){var t=!1;return"memory"===e&&(t=!0),t}},{key:"getStorageByType",value:function(e){if("memory"!==e)throw new s.AuthSdkError("Unrecognized storage option: ".concat(e));return this.getStorage()}},{key:"findStorageType",value:function(){return"memory"}},{key:"getHttpCache",value:function(){return null}},{key:"getStorage",value:function(){var e=this;return{getItem:this.nodeCache.get,setItem:function(t,n){e.nodeCache.set(t,n,"2200-01-01T00:00:00.000Z")}}}}]),e}())(u);t.default=l,e.exports=t.default},5265:function(e,t,n){"use strict";var r=n(5318);t.AutoRenewService=void 0;var o=r(n(4575)),a=r(n(3913)),i=n(2231),s=n(5705),u=n(9426),c=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(this,e),this.started=!1,this.tokenManager=t,this.options=n,this.renewTimeQueue=[],this.onTokenExpiredHandler=this.onTokenExpiredHandler.bind(this)}return(0,a.default)(e,[{key:"shouldThrottleRenew",value:function(){var e=!1;if(this.renewTimeQueue.push(Date.now()),this.renewTimeQueue.length>=10){var t=this.renewTimeQueue.shift();e=this.renewTimeQueue[this.renewTimeQueue.length-1]-t<3e4}return e}},{key:"requiresLeadership",value:function(){return!!this.options.syncStorage&&(0,u.isBrowser)()}},{key:"onTokenExpiredHandler",value:function(e){if(this.options.autoRenew)if(this.shouldThrottleRenew()){var t=new s.AuthSdkError("Too many token renew requests");this.tokenManager.emitError(t)}else this.tokenManager.renew(e).catch((function(){}));else this.options.autoRemove&&this.tokenManager.remove(e)}},{key:"canStart",value:function(){return!!this.options.autoRenew||!!this.options.autoRemove}},{key:"start",value:function(){this.canStart()&&(this.stop(),this.tokenManager.on(i.EVENT_EXPIRED,this.onTokenExpiredHandler),this.started=!0)}},{key:"stop",value:function(){this.started&&(this.tokenManager.off(i.EVENT_EXPIRED,this.onTokenExpiredHandler),this.renewTimeQueue=[],this.started=!1)}},{key:"isStarted",value:function(){return this.started}}]),e}();t.AutoRenewService=c},1354:function(e,t,n){"use strict";var r=n(5318);t.SyncStorageService=void 0;var o=r(n(4575)),a=r(n(3913)),i=n(9426),s=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(this,e),this.started=!1,this.tokenManager=t,this.options=n,this.storageListener=this.storageListener.bind(this)}return(0,a.default)(e,[{key:"storageListener",value:function(e){var t=this,n=e.key,r=e.newValue,o=e.oldValue,a=this.tokenManager.getOptions();(!n||n===a.storageKey&&r!==o)&&(this.syncTimeout=setTimeout((function(){return t.tokenManager.resetExpireEventTimeoutAll(),void t.tokenManager.emitEventsForCrossTabsStorageUpdate(r,o)}),a._storageEventDelay))}},{key:"requiresLeadership",value:function(){return!1}},{key:"isStarted",value:function(){return this.started}},{key:"canStart",value:function(){return!!this.options.syncStorage&&(0,i.isBrowser)()}},{key:"start",value:function(){this.canStart()&&(this.stop(),window.addEventListener("storage",this.storageListener),this.started=!0)}},{key:"stop",value:function(){this.started&&(window.removeEventListener("storage",this.storageListener),clearTimeout(this.syncTimeout),this.started=!1)}}]),e}();t.SyncStorageService=s},5139:function(e,t,n){"use strict";var r=n(5265);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(1354);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},3427:function(e,t,n){"use strict";t.sessionExists=function(e){return e.session.get().then((function(e){return"ACTIVE"===e.status})).catch((function(){return!1}))},t.getSession=function(e){return(0,o.get)(e,"/api/v1/sessions/me",{withCredentials:!0}).then((function(t){var n=(0,r.omit)(t,"_links");return n.refresh=function(){return(0,o.post)(e,(0,r.getLink)(t,"refresh").href,{},{withCredentials:!0})},n.user=function(){return(0,o.get)(e,(0,r.getLink)(t,"user").href,{withCredentials:!0})},n})).catch((function(){return{status:"INACTIVE"}}))},t.closeSession=function(e){return(0,o.httpRequest)(e,{url:e.getIssuerOrigin()+"/api/v1/sessions/me",method:"DELETE",withCredentials:!0})},t.refreshSession=function(e){return(0,o.post)(e,"/api/v1/sessions/me/lifecycle/refresh",{},{withCredentials:!0})},t.setCookieAndRedirect=function(e,t,n){n=n||window.location.href,window.location.assign(e.getIssuerOrigin()+"/login/sessionCookieRedirect"+(0,r.toQueryString)({checkAccountSetupComplete:!0,token:t,redirectUrl:n}))};var r=n(8965),o=n(2924)},7742:function(e,t,n){"use strict";var r=n(5318);t.AuthTransaction=void 0;var o=r(n(4575)),a=n(2924),i=n(8965),s=r(n(7948)),u=n(7442),c=n(637),l=n(256);function f(e,t,n,r,o){if(Array.isArray(r))return function(a,u){if(!a)throw new s.default("Must provide a link name");var c=(0,i.find)(r,{name:a});if(!c)throw new s.default("No link found for that name");return f(e,t,n,c,o)(u)};if(r.hints&&r.hints.allow&&1===r.hints.allow.length)switch(r.hints.allow[0]){case"GET":return function(){return(0,a.get)(e,r.href,{withCredentials:!0})};case"POST":return function(a){o&&o.isPolling&&(o.isPolling=!1);var c=(0,u.addStateToken)(t,a);"MFA_ENROLL"!==t.status&&"FACTOR_ENROLL"!==t.status||Object.assign(c,{factorType:n.factorType,provider:n.provider});var f={},d=c.autoPush;if(void 0!==d){if("function"==typeof d)try{f.autoPush=!!d()}catch(e){return Promise.reject(new s.default("AutoPush resulted in an error."))}else null!==d&&(f.autoPush=!!d);c=(0,i.omit)(c,"autoPush")}var h=c.rememberDevice;if(void 0!==h){if("function"==typeof h)try{f.rememberDevice=!!h()}catch(e){return Promise.reject(new s.default("RememberDevice resulted in an error."))}else null!==h&&(f.rememberDevice=!!h);c=(0,i.omit)(c,"rememberDevice")}else c.profile&&void 0!==c.profile.updatePhone&&(c.profile.updatePhone&&(f.updatePhone=!0),c.profile=(0,i.omit)(c.profile,"updatePhone"));var p=r.href+(0,i.toQueryString)(f);return(0,l.postToTransaction)(e,p,c)}}}function d(e,t,n,r){if(n=n||t,n=(0,i.clone)(n),Array.isArray(n)){for(var o=[],a=0,s=n.length;a<s;a++)o.push(d(e,t,n[a],r));return o}var u=n._embedded||{};for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&((0,i.isObject)(u[l])||Array.isArray(u[l]))&&(u[l]=d(e,t,u[l],r));var h=function(e,t,n,r){var o={};for(var a in n._links)if(Object.prototype.hasOwnProperty.call(n._links,a)){var i=n._links[a];if("next"===a&&(a=i.name),i.type)o[a]=i;else if("poll"===a)o.poll=(0,c.getPollFn)(e,t,r);else{var s=f(e,t,n,i,r);s&&(o[a]=s)}}return o}(e,t,n,r);return Object.assign(u,h),n=(0,i.omit)(n,"_embedded","_links"),Object.assign(n,u),n}t.AuthTransaction=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if((0,o.default)(this,e),this.data=void 0,this.status=void 0,n){if(this.data=n,this.data.interactionHandle)return void(this.status=n.status);Object.assign(this,d(t,n,n,{})),delete this.stateToken,"RECOVERY_CHALLENGE"!==n.status||n._links||(this.cancel=function(){return Promise.resolve(new e(t))})}}},4419:function(){},256:function(e,t,n){"use strict";var r=n(5318);t.transactionStatus=function(e,t){return t=(0,s.addStateToken)(e,t),(0,o.post)(e,e.getIssuerOrigin()+"/api/v1/authn",t,{withCredentials:!0})},t.resumeTransaction=function(e,t){if(!t||!t.stateToken){var n=e.tx.exists._get(i.STATE_TOKEN_KEY_NAME);if(!n)return Promise.reject(new a.default("No transaction to resume"));t={stateToken:n}}return e.tx.status(t).then((function(t){return new u.AuthTransaction(e,t)}))},t.introspectAuthn=function(e,t){if(!t||!t.stateToken){var n=e.tx.exists._get(i.STATE_TOKEN_KEY_NAME);if(!n)return Promise.reject(new a.default("No transaction to evaluate"));t={stateToken:n}}return c(e,t).then((function(t){return new u.AuthTransaction(e,t)}))},t.transactionStep=c,t.transactionExists=function(e){return!!e.tx.exists._get(i.STATE_TOKEN_KEY_NAME)},t.postToTransaction=function(e,t,n,r){return r=Object.assign({withCredentials:!0},r),(0,o.post)(e,t,n,r).then((function(t){return new u.AuthTransaction(e,t)}))};var o=n(2924),a=r(n(7948)),i=n(3754),s=n(7442),u=n(7742);function c(e,t){return t=(0,s.addStateToken)(e,t),(0,o.post)(e,e.getIssuerOrigin()+"/api/v1/authn/introspect",t,{withCredentials:!0})}},7847:function(e,t,n){"use strict";var r=n(256);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(7742);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(637);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(4419);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=n(7442);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}))},637:function(e,t,n){"use strict";var r=n(5318);t.getPollFn=function(e,t,n){return function(r){var f,d,h,p;(0,a.isNumber)(r)?f=r:(0,a.isObject)(r)&&(f=(r=r).delay,d=r.rememberDevice,h=r.autoPush,p=r.transactionCallBack),f||0===f||(f=i.DEFAULT_POLLING_DELAY);var v=(0,a.getLink)(t,"next","poll");n.isPolling=!0;var y=0;return function r(){return n.isPolling?function(){var n={};if("function"==typeof h)try{n.autoPush=!!h()}catch(e){return Promise.reject(new s.default("AutoPush resulted in an error."))}else null!=h&&(n.autoPush=!!h);if("function"==typeof d)try{n.rememberDevice=!!d()}catch(e){return Promise.reject(new s.default("RememberDevice resulted in an error."))}else null!=d&&(n.rememberDevice=!!d);var r=v.href+(0,a.toQueryString)(n);return(0,o.post)(e,r,(0,l.getStateToken)(t),{saveAuthnState:!1,withCredentials:!0})}().then((function(t){if(y=0,t.factorResult&&"WAITING"===t.factorResult){if(!n.isPolling)throw new u.default;return"function"==typeof p&&p(t),(0,a.delay)(f).then(r)}return n.isPolling=!1,new c.AuthTransaction(e,t)})).catch((function(e){if(e.xhr&&(0===e.xhr.status||429===e.xhr.status)&&y<=4){var t=1e3*Math.pow(2,y);return y++,(0,a.delay)(t).then(r)}throw e})):Promise.reject(new u.default)}().catch((function(e){throw n.isPolling=!1,e}))}};var o=n(2924),a=n(8965),i=n(3754),s=r(n(7948)),u=r(n(3820)),c=n(7742),l=n(7442)},7442:function(e,t){"use strict";function n(e,t){var n={};return Object.assign(n,t),!n.stateToken&&e.stateToken&&(n.stateToken=e.stateToken),n}t.addStateToken=n,t.getStateToken=function(e){return n(e)}},8930:function(){},1425:function(){},714:function(){},2841:function(){},461:function(){},4119:function(){},6621:function(){},9382:function(){},6220:function(e,t){"use strict";t.isToken=function(e){return!!(e&&(e.accessToken||e.idToken||e.refreshToken)&&Array.isArray(e.scopes))},t.isAccessToken=function(e){return e&&e.accessToken},t.isIDToken=function(e){return e&&e.idToken},t.isRefreshToken=function(e){return e&&e.refreshToken}},6861:function(){},3470:function(e,t,n){"use strict";var r=n(5318);t.isOAuthTransactionMeta=i,t.isPKCETransactionMeta=s,t.isIdxTransactionMeta=function(e){return!!s(e)&&!!e.interactionHandle},t.isCustomAuthTransactionMeta=u,t.isTransactionMeta=function(e){return!(!i(e)&&!u(e))};var o=r(n(8));function a(e){return!(!e||"object"!==(0,o.default)(e)||0===Object.values(e).length)}function i(e){return!(!a(e)||!e.redirectUri&&!e.responseType)}function s(e){return!!i(e)&&!!e.codeVerifier}function u(e){return!!a(e)&&void 0===Object.values(e).find((function(e){return"string"!=typeof e}))}},9978:function(){},5566:function(){},5775:function(){},858:function(e,t,n){"use strict";var r=n(5566);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(8930);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(714);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(3470);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=n(1425);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=n(5775);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=n(6473);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=n(2841);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var f=n(461);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var d=n(4119);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var h=n(9382);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=n(6220);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var v=n(6861);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===v[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}}))}));var y=n(6621);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===y[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}}))}));var g=n(9978);Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}))},151:function(e,t){"use strict";function n(){return"undefined"!=typeof window?window.console:"undefined"!=typeof console?console:void 0}function r(){var e=n();return e&&e.log?e:{log:function(){},warn:function(){},group:function(){},groupEnd:function(){}}}function o(e){r().warn("[okta-auth-sdk] DEPRECATION: "+e)}t.getNativeConsole=n,t.getConsole=r,t.warn=function(e){r().warn("[okta-auth-sdk] WARN: "+e)},t.deprecate=o,t.deprecateWrap=function(e,t){return function(){return o(e),t.apply(null,arguments)}}},8965:function(e,t,n){"use strict";var r=n(151);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(1466);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(9423);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(2645);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=n(8562);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}))},1466:function(e,t){"use strict";t.isoToUTCString=function(e){var t=e.match(/\d+/g),n=Date.UTC(t[0],t[1]-1,t[2],t[3],t[4],t[5]);return new Date(n).toUTCString()},t.genRandomString=function(e){for(var t="abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",n="",r=0,o=t.length;r<e;++r)n+=t[Math.floor(Math.random()*o)];return n},t.delay=function(e){return new Promise((function(t){setTimeout(t,e)}))}},9423:function(e,t){"use strict";function n(e){if(e){var t=JSON.stringify(e);if(t)return JSON.parse(t)}return e}t.bind=function(e,t){var n=Array.prototype.slice.call(arguments,2);return function(){var r=Array.prototype.slice.call(arguments);return r=n.concat(r),e.apply(t,r)}},t.extend=function(){var e=arguments[0],t=[].slice.call(arguments,1);return t.forEach((function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&void 0!==t[n]&&(e[n]=t[n])})),e},t.removeNils=function(e){var t={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];null!=r&&(t[n]=r)}return t},t.clone=n,t.omit=function(e){for(var t={},r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1==o.indexOf(i)&&(t[i]=e[i]);return n(t)},t.find=function(e,t){for(var n=e.length;n--;){var r=e[n],o=!0;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&r[a]!==t[a]){o=!1;break}if(o)return r}},t.getLink=function(e,t,r){if(e&&e._links){var o=n(e._links[t]);return o&&o.name&&r?o.name===r?o:void 0:o}}},2051:function(e,t,n){"use strict";t.pruneSharedStorage=function(e){var t=e.getSharedTansactionStorage(),n=t.getStorage();Object.keys(n).forEach((function(e){var t=n[e];Date.now()-t.dateCreated>18e5&&delete n[e]})),t.setStorage(n)},t.saveTransactionToSharedStorage=function(e,t,n){var r=e.getSharedTansactionStorage(),o=r.getStorage();o[t]={dateCreated:Date.now(),transaction:n},r.setStorage(o)},t.loadTransactionFromSharedStorage=function(e,t){var n=e.getSharedTansactionStorage().getStorage()[t];return n&&n.transaction&&(0,r.isTransactionMeta)(n.transaction)?n.transaction:null},t.clearTransactionFromSharedStorage=function(e,t){var n=e.getSharedTansactionStorage(),r=n.getStorage();delete r[t],n.setStorage(r)};var r=n(858)},2645:function(e,t){"use strict";t.isString=function(e){return"[object String]"===Object.prototype.toString.call(e)},t.isObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)},t.isNumber=function(e){return"[object Number]"===Object.prototype.toString.call(e)},t.isFunction=function(e){return!!e&&"[object Function]"==={}.toString.call(e)},t.isPromise=function(e){return e&&e.finally&&"function"==typeof e.finally}},8562:function(e,t){"use strict";function n(e){return/^(?:[a-z]+:)?\/\//i.test(e)}function r(e){if(e){var t=e.replace(/^\s+|\s+$/gm,"");return t.replace(/\/+$/,"")}}t.isAbsoluteUrl=n,t.toAbsoluteUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return n(e)?e:(t=r(t),"/"===e[0]?"".concat(t).concat(e):"".concat(t,"/").concat(e))},t.toRelativeUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return n(e)&&(e=e.substring(t.length)),"/"===e[0]?e:"/".concat(e)},t.toQueryString=function(e){var t=[];if(null!==e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&null!==e[n]&&t.push(n+"="+encodeURIComponent(e[n]));return t.length?"?"+t.join("&"):""},t.removeTrailingSlash=r},8991:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OPEN_BROADCAST_CHANNELS=t.BroadcastChannel=void 0,t.clearNodeFolder=function(e){e=(0,a.fillOptionsWithDefaults)(e);var t=(0,o.chooseMethod)(e);return"node"===t.type?t.clearNodeFolder().then((function(){return!0})):r.PROMISE_RESOLVED_FALSE},t.enforceOptions=function(e){s=e};var r=n(6202),o=n(4632),a=n(423),i=new Set;t.OPEN_BROADCAST_CHANNELS=i;var s,u=0,c=function(e,t){var n,c;this.id=u++,i.add(this),this.name=e,s&&(t=s),this.options=(0,a.fillOptionsWithDefaults)(t),this.method=(0,o.chooseMethod)(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,c=(n=this).method.create(n.name,n.options),(0,r.isPromise)(c)?(n._prepP=c,c.then((function(e){n._state=e}))):n._state=c};function l(e,t,n){var o={time:e.method.microSeconds(),type:t,data:n};return(e._prepP?e._prepP:r.PROMISE_RESOLVED_VOID).then((function(){var t=e.method.postMessage(e._state,o);return e._uMP.add(t),t.catch().then((function(){return e._uMP.delete(t)})),t}))}function f(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function d(e,t,n){e._addEL[t].push(n),function(e){if(!e._iL&&f(e)){var t=function(t){e._addEL[t.type].forEach((function(e){var n=e.time-1e5;t.time>=n&&e.fn(t.data)}))},n=e.method.microSeconds();e._prepP?e._prepP.then((function(){e._iL=!0,e.method.onMessage(e._state,t,n)})):(e._iL=!0,e.method.onMessage(e._state,t,n))}}(e)}function h(e,t,n){e._addEL[t]=e._addEL[t].filter((function(e){return e!==n})),function(e){if(e._iL&&!f(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}(e)}t.BroadcastChannel=c,c._pubkey=!0,c.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return l(this,"message",e)},postInternal:function(e){return l(this,"internal",e)},set onmessage(e){var t={time:this.method.microSeconds(),fn:e};h(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,d(this,"message",t)):this._onML=null},addEventListener:function(e,t){d(this,e,{time:this.method.microSeconds(),fn:t})},removeEventListener:function(e,t){h(this,e,this._addEL[e].find((function(e){return e.fn===t})))},close:function(){var e=this;if(!this.closed){i.delete(this),this.closed=!0;var t=this._prepP?this._prepP:r.PROMISE_RESOLVED_VOID;return this._onML=null,this._addEL.message=[],t.then((function(){return Promise.all(Array.from(e._uMP))})).then((function(){return Promise.all(e._befC.map((function(e){return e()})))})).then((function(){return e.method.close(e._state)}))}},get type(){return this.method.type},get isClosed(){return this.closed}}},8437:function(e,t,n){"use strict";var r=n(5585);e.exports={BroadcastChannel:r.BroadcastChannel,createLeaderElection:r.createLeaderElection,clearNodeFolder:r.clearNodeFolder,enforceOptions:r.enforceOptions,beLeader:r.beLeader}},5585:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BroadcastChannel",{enumerable:!0,get:function(){return r.BroadcastChannel}}),Object.defineProperty(t,"OPEN_BROADCAST_CHANNELS",{enumerable:!0,get:function(){return r.OPEN_BROADCAST_CHANNELS}}),Object.defineProperty(t,"beLeader",{enumerable:!0,get:function(){return o.beLeader}}),Object.defineProperty(t,"clearNodeFolder",{enumerable:!0,get:function(){return r.clearNodeFolder}}),Object.defineProperty(t,"createLeaderElection",{enumerable:!0,get:function(){return o.createLeaderElection}}),Object.defineProperty(t,"enforceOptions",{enumerable:!0,get:function(){return r.enforceOptions}});var r=n(8991),o=n(6550)},6550:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.beLeader=s,t.createLeaderElection=function(e,t){if(e._leaderElector)throw new Error("BroadcastChannel already has a leader-elector");t=function(e,t){return e||(e={}),(e=JSON.parse(JSON.stringify(e))).fallbackInterval||(e.fallbackInterval=3e3),e.responseTime||(e.responseTime=t.method.averageResponseTime(t.options)),e}(t,e);var n=new a(e,t);return e._befC.push((function(){return n.die()})),e._leaderElector=n,n};var r=n(6202),o=n(2499),a=function(e,t){var n=this;this.broadcastChannel=e,this._options=t,this.isLeader=!1,this.hasLeader=!1,this.isDead=!1,this.token=(0,r.randomToken)(),this._aplQ=r.PROMISE_RESOLVED_VOID,this._aplQC=0,this._unl=[],this._lstns=[],this._dpL=function(){},this._dpLC=!1;var o=function(e){"leader"===e.context&&("death"===e.action&&(n.hasLeader=!1),"tell"===e.action&&(n.hasLeader=!0))};this.broadcastChannel.addEventListener("internal",o),this._lstns.push(o)};function i(e,t){var n={context:"leader",action:t,token:e.token};return e.broadcastChannel.postInternal(n)}function s(e){e.isLeader=!0,e.hasLeader=!0;var t=(0,o.add)((function(){return e.die()}));e._unl.push(t);var n=function(t){"leader"===t.context&&"apply"===t.action&&i(e,"tell"),"leader"!==t.context||"tell"!==t.action||e._dpLC||(e._dpLC=!0,e._dpL(),i(e,"tell"))};return e.broadcastChannel.addEventListener("internal",n),e._lstns.push(n),i(e,"tell")}a.prototype={applyOnce:function(e){var t=this;return this.isLeader?(0,r.sleep)(0,!0):this.isDead?(0,r.sleep)(0,!1):this._aplQC>1?this._aplQ:(this._aplQC=this._aplQC+1,this._aplQ=this._aplQ.then((function(){return function(){if(t.isLeader)return r.PROMISE_RESOLVED_TRUE;var n,o=!1,a=new Promise((function(e){n=function(){o=!0,e()}})),u=[],c=function(e){"leader"===e.context&&e.token!=t.token&&(u.push(e),"apply"===e.action&&e.token>t.token&&n(),"tell"===e.action&&(n(),t.hasLeader=!0))};t.broadcastChannel.addEventListener("internal",c);var l=e?4*t._options.responseTime:t._options.responseTime;return i(t,"apply").then((function(){return Promise.race([(0,r.sleep)(l),a.then((function(){return Promise.reject(new Error)}))])})).then((function(){return i(t,"apply")})).then((function(){return Promise.race([(0,r.sleep)(l),a.then((function(){return Promise.reject(new Error)}))])})).catch((function(){})).then((function(){return t.broadcastChannel.removeEventListener("internal",c),!o&&s(t).then((function(){return!0}))}))}()})).then((function(){t._aplQC=t._aplQC-1})),this._aplQ.then((function(){return t.isLeader})))},awaitLeadership:function(){return this._aLP||(this._aLP=(e=this).isLeader?r.PROMISE_RESOLVED_VOID:new Promise((function(t){var n=!1;function o(){n||(n=!0,e.broadcastChannel.removeEventListener("internal",a),t(!0))}e.applyOnce().then((function(){e.isLeader&&o()})),function t(){return(0,r.sleep)(e._options.fallbackInterval).then((function(){if(!e.isDead&&!n)return e.isLeader?void o():e.applyOnce(!0).then((function(){e.isLeader?o():t()}))}))}();var a=function(t){"leader"===t.context&&"death"===t.action&&(e.hasLeader=!1,e.applyOnce().then((function(){e.isLeader&&o()})))};e.broadcastChannel.addEventListener("internal",a),e._lstns.push(a)}))),this._aLP;var e},set onduplicate(e){this._dpL=e},die:function(){var e=this;return this._lstns.forEach((function(t){return e.broadcastChannel.removeEventListener("internal",t)})),this._lstns=[],this._unl.forEach((function(e){return e.remove()})),this._unl=[],this.isLeader&&(this.hasLeader=!1,this.isLeader=!1),this.isDead=!0,i(this,"death")}}},4632:function(e,t,n){"use strict";var r=n(8330);n(1909),Object.defineProperty(t,"__esModule",{value:!0}),t.chooseMethod=function(e){var t=[].concat(e.methods,c).filter(Boolean);if(e.type){if("simulate"===e.type)return s.default;var n=t.find((function(t){return t.type===e.type}));if(n)return n;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||u.isNode||(t=t.filter((function(e){return"idb"!==e.type})));var r=t.find((function(e){return e.canBeUsed()}));if(r)return r;throw new Error("No useable method found in "+JSON.stringify(c.map((function(e){return e.type}))))};var o=r(n(6115)),a=r(n(9122)),i=r(n(4924)),s=r(n(1574)),u=n(6202),c=[o.default,a.default,i.default]},9122:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.averageResponseTime=O,t.canBeUsed=w,t.cleanOldMessages=p,t.close=m,t.create=v,t.createDatabase=c,t.default=void 0,t.getAllMessages=function(e){var t=e.transaction(s).objectStore(s),n=[];return new Promise((function(e){t.openCursor().onsuccess=function(t){var r=t.target.result;r?(n.push(r.value),r.continue()):e(n)}}))},t.getIdb=u,t.getMessagesHigherThan=f,t.getOldMessages=h,t.microSeconds=void 0,t.onMessage=k,t.postMessage=b,t.removeMessageById=d,t.type=void 0,t.writeMessage=l;var r=n(6202),o=n(2151),a=n(423),i=r.microSeconds;t.microSeconds=i;var s="messages";function u(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function c(e){var t="pubkey.broadcast-channel-0-"+e,n=u().open(t,1);return n.onupgradeneeded=function(e){e.target.result.createObjectStore(s,{keyPath:"id",autoIncrement:!0})},new Promise((function(e,t){n.onerror=function(e){return t(e)},n.onsuccess=function(){e(n.result)}}))}function l(e,t,n){var r={uuid:t,time:(new Date).getTime(),data:n},o=e.transaction([s],"readwrite");return new Promise((function(e,t){o.oncomplete=function(){return e()},o.onerror=function(e){return t(e)},o.objectStore(s).add(r)}))}function f(e,t){var n=e.transaction(s).objectStore(s),r=[];return new Promise((function(e){(function(){try{var e=IDBKeyRange.bound(t+1,1/0);return n.openCursor(e)}catch(e){return n.openCursor()}}()).onsuccess=function(n){var o=n.target.result;o?o.value.id<t+1?o.continue(t+1):(r.push(o.value),o.continue()):e(r)}}))}function d(e,t){var n=e.transaction([s],"readwrite").objectStore(s).delete(t);return new Promise((function(e){n.onsuccess=function(){return e()}}))}function h(e,t){var n=(new Date).getTime()-t,r=e.transaction(s).objectStore(s),o=[];return new Promise((function(e){r.openCursor().onsuccess=function(t){var r=t.target.result;if(r){var a=r.value;if(!(a.time<n))return void e(o);o.push(a),r.continue()}else e(o)}}))}function p(e,t){return h(e,t).then((function(t){return Promise.all(t.map((function(t){return d(e,t.id)})))}))}function v(e,t){return t=(0,a.fillOptionsWithDefaults)(t),c(e).then((function(n){var a={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:(0,r.randomToken)(),eMIs:new o.ObliviousSet(2*t.idb.ttl),writeBlockPromise:r.PROMISE_RESOLVED_VOID,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){a.closed=!0,t.idb.onclose&&t.idb.onclose()},y(a),a}))}function y(e){e.closed||g(e).then((function(){return(0,r.sleep)(e.options.idb.fallbackInterval)})).then((function(){return y(e)}))}function g(e){return e.closed?r.PROMISE_RESOLVED_VOID:e.messagesCallback?f(e.db,e.lastCursorId).then((function(t){var n=t.filter((function(e){return!!e})).map((function(t){return t.id>e.lastCursorId&&(e.lastCursorId=t.id),t})).filter((function(t){return function(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}(t,e)})).sort((function(e,t){return e.time-t.time}));return n.forEach((function(t){e.messagesCallback&&(e.eMIs.add(t.id),e.messagesCallback(t.data))})),r.PROMISE_RESOLVED_VOID})):r.PROMISE_RESOLVED_VOID}function m(e){e.closed=!0,e.db.close()}function b(e,t){return e.writeBlockPromise=e.writeBlockPromise.then((function(){return l(e.db,e.uuid,t)})).then((function(){0===(0,r.randomInt)(0,10)&&p(e.db,e.options.idb.ttl)})),e.writeBlockPromise}function k(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,g(e)}function w(){return!r.isNode&&!!u()}function O(e){return 2*e.idb.fallbackInterval}t.type="idb";var E={create:v,close:m,onMessage:k,postMessage:b,canBeUsed:w,type:"idb",averageResponseTime:O,microSeconds:i};t.default=E},4924:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addStorageEventListener=f,t.averageResponseTime=g,t.canBeUsed=y,t.close=p,t.create=h,t.default=void 0,t.getLocalStorage=u,t.microSeconds=void 0,t.onMessage=v,t.postMessage=l,t.removeStorageEventListener=d,t.storageKey=c,t.type=void 0;var r=n(2151),o=n(423),a=n(6202),i=a.microSeconds;t.microSeconds=i;var s="localstorage";function u(){var e;if("undefined"==typeof window)return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch(e){}return e}function c(e){return"pubkey.broadcastChannel-"+e}function l(e,t){return new Promise((function(n){(0,a.sleep)().then((function(){var r=c(e.channelName),o={token:(0,a.randomToken)(),time:(new Date).getTime(),data:t,uuid:e.uuid},i=JSON.stringify(o);u().setItem(r,i);var s=document.createEvent("Event");s.initEvent("storage",!0,!0),s.key=r,s.newValue=i,window.dispatchEvent(s),n()}))}))}function f(e,t){var n=c(e),r=function(e){e.key===n&&t(JSON.parse(e.newValue))};return window.addEventListener("storage",r),r}function d(e){window.removeEventListener("storage",e)}function h(e,t){if(t=(0,o.fillOptionsWithDefaults)(t),!y())throw new Error("BroadcastChannel: localstorage cannot be used");var n=(0,a.randomToken)(),i=new r.ObliviousSet(t.localstorage.removeTimeout),s={channelName:e,uuid:n,eMIs:i};return s.listener=f(e,(function(e){s.messagesCallback&&e.uuid!==n&&e.token&&!i.has(e.token)&&(e.data.time&&e.data.time<s.messagesCallbackTime||(i.add(e.token),s.messagesCallback(e.data)))})),s}function p(e){d(e.listener)}function v(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t}function y(){if(a.isNode)return!1;var e=u();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch(e){return!1}return!0}function g(){var e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")?240:120}t.type=s;var m={create:h,close:p,onMessage:v,postMessage:l,canBeUsed:y,type:s,averageResponseTime:g,microSeconds:i};t.default=m},6115:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.averageResponseTime=f,t.canBeUsed=l,t.close=s,t.create=i,t.microSeconds=t.default=void 0,t.onMessage=c,t.postMessage=u,t.type=void 0;var r=n(6202),o=r.microSeconds;t.microSeconds=o;var a="native";function i(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(e){t.messagesCallback&&t.messagesCallback(e.data)},t}function s(e){e.bc.close(),e.subFns=[]}function u(e,t){try{return e.bc.postMessage(t,!1),r.PROMISE_RESOLVED_VOID}catch(e){return Promise.reject(e)}}function c(e,t){e.messagesCallback=t}function l(){if(r.isNode&&"undefined"==typeof window)return!1;if("function"==typeof BroadcastChannel){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}return!1}function f(){return 150}t.type=a;var d={create:i,close:s,onMessage:c,postMessage:u,canBeUsed:l,type:a,averageResponseTime:f,microSeconds:o};t.default=d},1574:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.averageResponseTime=f,t.canBeUsed=l,t.close=s,t.create=i,t.microSeconds=t.default=void 0,t.onMessage=c,t.postMessage=u,t.type=void 0;var r=n(6202).microSeconds;t.microSeconds=r;var o="simulate";t.type=o;var a=new Set;function i(e){var t={name:e,messagesCallback:null};return a.add(t),t}function s(e){a.delete(e)}function u(e,t){return new Promise((function(n){return setTimeout((function(){Array.from(a).filter((function(t){return t.name===e.name})).filter((function(t){return t!==e})).filter((function(e){return!!e.messagesCallback})).forEach((function(e){return e.messagesCallback(t)})),n()}),5)}))}function c(e,t){e.messagesCallback=t}function l(){return!0}function f(){return 5}var d={create:i,close:s,onMessage:c,postMessage:u,canBeUsed:l,type:o,averageResponseTime:f,microSeconds:r};t.default=d},423:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fillOptionsWithDefaults=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return void 0===t.webWorkerSupport&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=45e3),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&"function"==typeof e.idb.onclose&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=6e4),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=12e4),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),void 0===t.node.useFastPath&&(t.node.useFastPath=!0),t}},6202:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=t.PROMISE_RESOLVED_VOID=t.PROMISE_RESOLVED_TRUE=t.PROMISE_RESOLVED_FALSE=void 0,t.isPromise=function(e){return!(!e||"function"!=typeof e.then)},t.microSeconds=function(){var e=(new Date).getTime();return e===a?1e3*e+ ++i:(a=e,i=0,1e3*e)},t.randomInt=function(e,t){return Math.floor(Math.random()*(t-e+1)+e)},t.randomToken=function(){return Math.random().toString(36).substring(2)},t.sleep=function(e,t){return e||(e=0),new Promise((function(n){return setTimeout((function(){return n(t)}),e)}))};var n=Promise.resolve(!1);t.PROMISE_RESOLVED_FALSE=n;var r=Promise.resolve(!0);t.PROMISE_RESOLVED_TRUE=r;var o=Promise.resolve();t.PROMISE_RESOLVED_VOID=o;var a=0,i=0,s="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0);t.isNode=s},8330:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},1909:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4098:function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,i="ArrayBuffer"in e;if(i)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function v(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():i&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var e,t,n,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=p(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(k)}),this.json=function(){return this.text().then(JSON.parse)},this}d.prototype.append=function(e,t){e=c(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},d.prototype.delete=function(e){delete this.map[c(e)]},d.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},d.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},d.prototype.set=function(e,t){this.map[c(e)]=l(t)},d.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},d.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},d.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},d.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},r&&(d.prototype[Symbol.iterator]=d.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e,t){var n,r,o=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new d(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new d(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),m.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function k(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},g.call(b.prototype),g.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var O=[301,302,303,307,308];w.redirect=function(e,t){if(-1===O.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function E(e,n){return new Promise((function(r,a){var i=new b(e,n);if(i.signal&&i.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;r(new w(o,n))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(i.method,i.url,!0),"include"===i.credentials?s.withCredentials=!0:"omit"===i.credentials&&(s.withCredentials=!1),"responseType"in s&&o&&(s.responseType="blob"),i.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&i.signal.removeEventListener("abort",u)}),s.send(void 0===i._bodyInit?null:i._bodyInit)}))}E.polyfill=!0,e.fetch||(e.fetch=E,e.Headers=d,e.Request=b,e.Response=w),t.Headers=d,t.Request=b,t.Response=w,t.fetch=E,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},5643:function(e){e.exports=!1},7187:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}v(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,{once:!0})}(e,o)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var i=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var o,a,i,c;if(s(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),i=a[t]),void 0===i)i=a[t]=n,++e._eventsCount;else if("function"==typeof i?i=a[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(o=u(e))>0&&i.length>o&&!i.warned){i.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=i.length,c=l,console&&console.warn&&console.warn(c)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=l.bind(r);return o.listener=n,r.wrapFn=o,o}function d(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):p(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(a){r.once&&e.removeEventListener(t,o),n(a)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,a=this._events;if(void 0!==a)o=o&&void 0===a.error;else if(!o)return!1;if(o){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var u=a[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var c=u.length,l=p(u,c);for(n=0;n<c;++n)r(l[n],this,t)}return!0},a.prototype.addListener=function(e,t){return c(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return c(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,f(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,f(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,o,a,i;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){i=n[a].listener,o=a;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,i||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(o=a[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},646:function(e){e.exports=function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}return function t(n,r){function o(t,o,a){if("undefined"!=typeof document){"number"==typeof(a=e({},r,a)).expires&&(a.expires=new Date(Date.now()+864e5*a.expires)),a.expires&&(a.expires=a.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var s in a)a[s]&&(i+="; "+s,!0!==a[s]&&(i+="="+a[s].split(";")[0]));return document.cookie=t+"="+n.write(o,t)+i}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],r={},o=0;o<t.length;o++){var a=t[o].split("="),i=a.slice(1).join("=");try{var s=decodeURIComponent(a[0]);if(r[s]=n.read(i,s),e===s)break}catch(e){}}return e?r[e]:r}},remove:function(t,n){o(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()},321:function(e,t,n){(function(){(e.exports=n(5282)).version="5.1.2"}).call(this)},5282:function(e,t,n){(function(){var t,r,o=[].splice,a=function(e,t){if(!(e instanceof t))throw new Error("Bound instance method accessed before binding")},i=[].indexOf;r=n(2392),t=n(7187).EventEmitter,e.exports=function(){class e extends t{constructor(e={}){super(),this.get=this.get.bind(this),this.mget=this.mget.bind(this),this.set=this.set.bind(this),this.mset=this.mset.bind(this),this.del=this.del.bind(this),this.take=this.take.bind(this),this.ttl=this.ttl.bind(this),this.getTtl=this.getTtl.bind(this),this.keys=this.keys.bind(this),this.has=this.has.bind(this),this.getStats=this.getStats.bind(this),this.flushAll=this.flushAll.bind(this),this.flushStats=this.flushStats.bind(this),this.close=this.close.bind(this),this._checkData=this._checkData.bind(this),this._check=this._check.bind(this),this._isInvalidKey=this._isInvalidKey.bind(this),this._wrap=this._wrap.bind(this),this._getValLength=this._getValLength.bind(this),this._error=this._error.bind(this),this._initErrors=this._initErrors.bind(this),this.options=e,this._initErrors(),this.data={},this.options=Object.assign({forceString:!1,objectValueSize:80,promiseValueSize:80,arrayValueSize:40,stdTTL:0,checkperiod:600,useClones:!0,deleteOnExpire:!0,enableLegacyCallbacks:!1,maxKeys:-1},this.options),this.options.enableLegacyCallbacks&&(console.warn("WARNING! node-cache legacy callback support will drop in v6.x"),["get","mget","set","del","ttl","getTtl","keys","has"].forEach((e=>{var t;t=this[e],this[e]=function(...e){var n,r;if(r=e,[...e]=r,[n]=o.call(e,-1),"function"!=typeof n)return t(...e,n);try{n(null,t(...e))}catch(e){n(e)}}}))),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.validKeyTypes=["string","number"],this._checkData()}get(t){var n;if(a(this,e),null!=(n=this._isInvalidKey(t)))throw n;return null!=this.data[t]&&this._check(t,this.data[t])?(this.stats.hits++,this._unwrap(this.data[t])):void this.stats.misses++}mget(t){var n,r,o,i,s;if(a(this,e),!Array.isArray(t))throw this._error("EKEYSTYPE");for(s={},r=0,i=t.length;r<i;r++){if(o=t[r],null!=(n=this._isInvalidKey(o)))throw n;null!=this.data[o]&&this._check(o,this.data[o])?(this.stats.hits++,s[o]=this._unwrap(this.data[o])):this.stats.misses++}return s}set(t,n,r){var o,i;if(a(this,e),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw this._error("ECACHEFULL");if(this.options.forceString,null==r&&(r=this.options.stdTTL),null!=(o=this._isInvalidKey(t)))throw o;return i=!1,this.data[t]&&(i=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[t],!1))),this.data[t]=this._wrap(n,r),this.stats.vsize+=this._getValLength(n),i||(this.stats.ksize+=this._getKeyLength(t),this.stats.keys++),this.emit("set",t,n),!0}mset(t){var n,r,o,i,s,u,c,l,f;if(a(this,e),this.options.maxKeys>-1&&this.stats.keys+t.length>=this.options.maxKeys)throw this._error("ECACHEFULL");for(r=0,u=t.length;r<u;r++){if(s=t[r],({key:i,val:f,ttl:l}=s),l&&"number"!=typeof l)throw this._error("ETTLTYPE");if(null!=(n=this._isInvalidKey(i)))throw n}for(o=0,c=t.length;o<c;o++)s=t[o],({key:i,val:f,ttl:l}=s),this.set(i,f,l);return!0}del(t){var n,r,o,i,s,u;for(a(this,e),Array.isArray(t)||(t=[t]),n=0,o=0,s=t.length;o<s;o++){if(i=t[o],null!=(r=this._isInvalidKey(i)))throw r;null!=this.data[i]&&(this.stats.vsize-=this._getValLength(this._unwrap(this.data[i],!1)),this.stats.ksize-=this._getKeyLength(i),this.stats.keys--,n++,u=this.data[i],delete this.data[i],this.emit("del",i,u.v))}return n}take(t){var n;return a(this,e),null!=(n=this.get(t))&&this.del(t),n}ttl(t,n){var r;if(a(this,e),n||(n=this.options.stdTTL),!t)return!1;if(null!=(r=this._isInvalidKey(t)))throw r;return!(null==this.data[t]||!this._check(t,this.data[t])||(n>=0?this.data[t]=this._wrap(this.data[t].v,n,!1):this.del(t),0))}getTtl(t){var n;if(a(this,e),t){if(null!=(n=this._isInvalidKey(t)))throw n;return null!=this.data[t]&&this._check(t,this.data[t])?this.data[t].t:void 0}}keys(){return a(this,e),Object.keys(this.data)}has(t){return a(this,e),null!=this.data[t]&&this._check(t,this.data[t])}getStats(){return a(this,e),this.stats}flushAll(t=!0){a(this,e),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this._killCheckPeriod(),this._checkData(t),this.emit("flush")}flushStats(){a(this,e),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){a(this,e),this._killCheckPeriod()}_checkData(t=!0){var n,r,o;for(n in a(this,e),r=this.data)o=r[n],this._check(n,o);t&&this.options.checkperiod>0&&(this.checkTimeout=setTimeout(this._checkData,1e3*this.options.checkperiod,t),null!=this.checkTimeout&&null!=this.checkTimeout.unref&&this.checkTimeout.unref())}_killCheckPeriod(){if(null!=this.checkTimeout)return clearTimeout(this.checkTimeout)}_check(t,n){var r;return a(this,e),r=!0,0!==n.t&&n.t<Date.now()&&(this.options.deleteOnExpire&&(r=!1,this.del(t)),this.emit("expired",t,this._unwrap(n))),r}_isInvalidKey(t){var n;if(a(this,e),n=typeof t,i.call(this.validKeyTypes,n)<0)return this._error("EKEYTYPE",{type:typeof t})}_wrap(t,n,o=!0){var i;return a(this,e),this.options.useClones||(o=!1),i=Date.now(),{t:0===n?0:n?i+1e3*n:0===this.options.stdTTL?this.options.stdTTL:i+1e3*this.options.stdTTL,v:o?r(t):t}}_unwrap(e,t=!0){return this.options.useClones||(t=!1),null!=e.v?t?r(e.v):e.v:null}_getKeyLength(e){return e.toString().length}_getValLength(t){return a(this,e),"string"==typeof t?t.length:this.options.forceString?JSON.stringify(t).length:Array.isArray(t)?this.options.arrayValueSize*t.length:"number"==typeof t?8:"function"==typeof(null!=t?t.then:void 0)?this.options.promiseValueSize:("undefined"!=typeof Buffer&&null!==Buffer?Buffer.isBuffer(t):void 0)?t.length:null!=t&&"object"==typeof t?this.options.objectValueSize*Object.keys(t).length:"boolean"==typeof t?8:0}_error(t,n={}){var r;return a(this,e),(r=new Error).name=t,r.errorcode=t,r.message=null!=this.ERRORS[t]?this.ERRORS[t](n):"-",r.data=n,r}_initErrors(){var t,n,r;for(n in a(this,e),this.ERRORS={},r=this._ERRORS)t=r[n],this.ERRORS[n]=this.createErrorMessage(t)}createErrorMessage(e){return function(t){return e.replace("__key",t.type)}}}return e.prototype._ERRORS={ENOTFOUND:"Key `__key` not found",ECACHEFULL:"Cache max keys amount exceeded",EKEYTYPE:"The key argument has to be of type `string` or `number`. Found: `__key`",EKEYSTYPE:"The keys argument has to be an array.",ETTLTYPE:"The ttl argument has to be a number."},e}.call(this)}).call(this)},2392:function(e){var t=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,n,r;try{t=Map}catch(e){t=function(){}}try{n=Set}catch(e){n=function(){}}try{r=Promise}catch(e){r=function(){}}function o(a,s,u,c,l){"object"==typeof s&&(u=s.depth,c=s.prototype,l=s.includeNonEnumerable,s=s.circular);var f=[],d=[],h="undefined"!=typeof Buffer;return void 0===s&&(s=!0),void 0===u&&(u=1/0),function a(u,p){if(null===u)return null;if(0===p)return u;var v,y;if("object"!=typeof u)return u;if(e(u,t))v=new t;else if(e(u,n))v=new n;else if(e(u,r))v=new r((function(e,t){u.then((function(t){e(a(t,p-1))}),(function(e){t(a(e,p-1))}))}));else if(o.__isArray(u))v=[];else if(o.__isRegExp(u))v=new RegExp(u.source,i(u)),u.lastIndex&&(v.lastIndex=u.lastIndex);else if(o.__isDate(u))v=new Date(u.getTime());else{if(h&&Buffer.isBuffer(u))return v=Buffer.allocUnsafe?Buffer.allocUnsafe(u.length):new Buffer(u.length),u.copy(v),v;e(u,Error)?v=Object.create(u):void 0===c?(y=Object.getPrototypeOf(u),v=Object.create(y)):(v=Object.create(c),y=c)}if(s){var g=f.indexOf(u);if(-1!=g)return d[g];f.push(u),d.push(v)}for(var m in e(u,t)&&u.forEach((function(e,t){var n=a(t,p-1),r=a(e,p-1);v.set(n,r)})),e(u,n)&&u.forEach((function(e){var t=a(e,p-1);v.add(t)})),u){var b;y&&(b=Object.getOwnPropertyDescriptor(y,m)),b&&null==b.set||(v[m]=a(u[m],p-1))}if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(u);for(m=0;m<k.length;m++){var w=k[m];(!(E=Object.getOwnPropertyDescriptor(u,w))||E.enumerable||l)&&(v[w]=a(u[w],p-1),E.enumerable||Object.defineProperty(v,w,{enumerable:!1}))}}if(l){var O=Object.getOwnPropertyNames(u);for(m=0;m<O.length;m++){var E,S=O[m];(E=Object.getOwnPropertyDescriptor(u,S))&&E.enumerable||(v[S]=a(u[S],p-1),Object.defineProperty(v,S,{enumerable:!1}))}}return v}(a,u)}function a(e){return Object.prototype.toString.call(e)}function i(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return o.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},o.__objToStr=a,o.__isDate=function(e){return"object"==typeof e&&"[object Date]"===a(e)},o.__isArray=function(e){return"object"==typeof e&&"[object Array]"===a(e)},o.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===a(e)},o.__getRegExpFlags=i,o}();e.exports&&(e.exports=t)},2151:function(e,t,n){"use strict";n.r(t),n.d(t,{ObliviousSet:function(){return r},removeTooOldValues:function(){return o},now:function(){return a}});var r=function(){function e(e){this.ttl=e,this.set=new Set,this.timeMap=new Map}return e.prototype.has=function(e){return this.set.has(e)},e.prototype.add=function(e){var t=this;this.timeMap.set(e,a()),this.set.add(e),setTimeout((function(){o(t)}),0)},e.prototype.clear=function(){this.set.clear(),this.timeMap.clear()},e}();function o(e){for(var t=a()-e.ttl,n=e.set[Symbol.iterator]();;){var r=n.next().value;if(!r)return;if(!(e.timeMap.get(r)<t))return;e.timeMap.delete(r),e.set.delete(r)}}function a(){return(new Date).getTime()}},5666:function(e){var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,a=Object.create(o.prototype),i=new A(r||[]);return a._invoke=function(e,t,n){var r=f;return function(o,a){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw a;return P()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=T(i,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var u=l(e,t,n);if("normal"===u.type){if(r=n.done?p:d,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(e,n,i),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f="suspendedStart",d="suspendedYield",h="executing",p="completed",v={};function y(){}function g(){}function m(){}var b={};b[a]=function(){return this};var k=Object.getPrototypeOf,w=k&&k(k(R([])));w&&w!==n&&r.call(w,a)&&(b=w);var O=m.prototype=y.prototype=Object.create(b);function E(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,s){var u=l(e[o],e,a);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,s)}),(function(e){n("throw",e,i,s)})):t.resolve(f).then((function(e){c.value=e,i(c)}),(function(e){return n("throw",e,i,s)}))}s(u.arg)}var o;this._invoke=function(e,r){function a(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(a,a):a()}}function T(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function R(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}return{next:P}}function P(){return{value:t,done:!0}}return g.prototype=O.constructor=m,m.constructor=g,g.displayName=u(m,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,s,"GeneratorFunction")),e.prototype=Object.create(O),e},e.awrap=function(e){return{__await:e}},E(S.prototype),S.prototype[i]=function(){return this},e.AsyncIterator=S,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var i=new S(c(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},E(O),u(O,s,"Generator"),O[a]=function(){return this},O.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=R,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(x),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:R(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},4279:function(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var a=0,i=r.length;a<i;a++)r[a].fn!==t&&r[a].fn._!==t&&o.push(r[a]);return o.length?n[e]=o:delete n[e],this}},e.exports=t},2499:function(e,t,n){"use strict";n.r(t),n.d(t,{add:function(){return f},getSize:function(){return p},removeAll:function(){return h},runAll:function(){return d}});var r=n(5643),o=n.n(r),a={add:function(e){if("function"==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope);else{if("function"!=typeof window.addEventListener)return;window.addEventListener("beforeunload",(function(){e()}),!0),window.addEventListener("unload",(function(){e()}),!0)}}},i=n(199),s=n.n(i),u=o()?s():a,c=new Set,l=!1;function f(e){if(l||(l=!0,u.add(d)),"function"!=typeof e)throw new Error("Listener is no function");return c.add(e),{remove:function(){return c.delete(e)},run:function(){return c.delete(e),e()}}}function d(){var e=[];return c.forEach((function(t){e.push(t()),c.delete(t)})),Promise.all(e)}function h(){c.clear()}function p(){return c.size}},199:function(){},5883:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function s(e,t,n){return s=i()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&a(o,n.prototype),o},s.apply(null,arguments)}function u(e){var t="function"==typeof Map?new Map:void 0;return u=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,o(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,e)},u(e)}function c(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.r(t),n.d(t,{JSONPath:function(){return g}});var h=Object.prototype.hasOwnProperty;function p(e,t){return(e=e.slice()).push(t),e}function v(e,t){return(t=t.slice()).unshift(e),t}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(s,e);var t,n,r=(t=s,n=i(),function(){var e,r=o(t);if(n){var a=o(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return c(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=r.call(this,'JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)')).avoidNew=!0,t.value=e,t.name="NewError",t}return s}(u(Error));function g(e,t,n,o,a){if(!(this instanceof g))try{return new g(e,t,n,o,a)}catch(e){if(!e.avoidNew)throw e;return e.value}"string"==typeof e&&(a=o,o=n,n=t,t=e,e=null);var i=e&&"object"===r(e);if(e=e||{},this.json=e.json||n,this.path=e.path||t,this.resultType=e.resultType||"value",this.flatten=e.flatten||!1,this.wrap=!h.call(e,"wrap")||e.wrap,this.sandbox=e.sandbox||{},this.preventEval=e.preventEval||!1,this.parent=e.parent||null,this.parentProperty=e.parentProperty||null,this.callback=e.callback||o||null,this.otherTypeCallback=e.otherTypeCallback||a||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},!1!==e.autostart){var s={path:i?e.path:t};i?"json"in e&&(s.json=e.json):s.json=n;var u=this.evaluate(s);if(!u||"object"!==r(u))throw new y(u);return u}}g.prototype.evaluate=function(e,t,n,o){var a=this,i=this.parent,s=this.parentProperty,u=this.flatten,c=this.wrap;if(this.currResultType=this.resultType,this.currPreventEval=this.preventEval,this.currSandbox=this.sandbox,n=n||this.callback,this.currOtherTypeCallback=o||this.otherTypeCallback,t=t||this.json,(e=e||this.path)&&"object"===r(e)&&!Array.isArray(e)){if(!e.path&&""!==e.path)throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!h.call(e,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');t=e.json,u=h.call(e,"flatten")?e.flatten:u,this.currResultType=h.call(e,"resultType")?e.resultType:this.currResultType,this.currSandbox=h.call(e,"sandbox")?e.sandbox:this.currSandbox,c=h.call(e,"wrap")?e.wrap:c,this.currPreventEval=h.call(e,"preventEval")?e.preventEval:this.currPreventEval,n=h.call(e,"callback")?e.callback:n,this.currOtherTypeCallback=h.call(e,"otherTypeCallback")?e.otherTypeCallback:this.currOtherTypeCallback,i=h.call(e,"parent")?e.parent:i,s=h.call(e,"parentProperty")?e.parentProperty:s,e=e.path}if(i=i||null,s=s||null,Array.isArray(e)&&(e=g.toPathString(e)),(e||""===e)&&t){var l=g.toPathArray(e);"$"===l[0]&&l.length>1&&l.shift(),this._hasParentSelector=null;var f=this._trace(l,t,["$"],i,s,n).filter((function(e){return e&&!e.isParentSelector}));return f.length?c||1!==f.length||f[0].hasArrExpr?f.reduce((function(e,t){var n=a._getPreferredOutput(t);return u&&Array.isArray(n)?e=e.concat(n):e.push(n),e}),[]):this._getPreferredOutput(f[0]):c?[]:void 0}},g.prototype._getPreferredOutput=function(e){var t=this.currResultType;switch(t){case"all":var n=Array.isArray(e.path)?e.path:g.toPathArray(e.path);return e.pointer=g.toPointer(n),e.path="string"==typeof e.path?e.path:g.toPathString(e.path),e;case"value":case"parent":case"parentProperty":return e[t];case"path":return g.toPathString(e[t]);case"pointer":return g.toPointer(e.path);default:throw new TypeError("Unknown result type")}},g.prototype._handleCallback=function(e,t,n){if(t){var r=this._getPreferredOutput(e);e.path="string"==typeof e.path?e.path:g.toPathString(e.path),t(r,n,e)}},g.prototype._trace=function(e,t,n,o,a,i,s,u){var c,l=this;if(!e.length)return c={path:n,value:t,parent:o,parentProperty:a,hasArrExpr:s},this._handleCallback(c,i,"value"),c;var d=e[0],y=e.slice(1),g=[];function m(e){Array.isArray(e)?e.forEach((function(e){g.push(e)})):g.push(e)}if(("string"!=typeof d||u)&&t&&h.call(t,d))m(this._trace(y,t[d],p(n,d),t,d,i,s));else if("*"===d)this._walk(d,y,t,n,o,a,i,(function(e,t,n,r,o,a,i,s){m(l._trace(v(e,n),r,o,a,i,s,!0,!0))}));else if(".."===d)m(this._trace(y,t,n,o,a,i,s)),this._walk(d,y,t,n,o,a,i,(function(e,t,n,o,a,i,s,u){"object"===r(o[e])&&m(l._trace(v(t,n),o[e],p(a,e),o,e,u,!0))}));else{if("^"===d)return this._hasParentSelector=!0,{path:n.slice(0,-1),expr:y,isParentSelector:!0};if("~"===d)return c={path:p(n,d),value:a,parent:o,parentProperty:null},this._handleCallback(c,i,"property"),c;if("$"===d)m(this._trace(y,t,n,null,null,i,s));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(d))m(this._slice(d,y,t,n,o,a,i));else if(0===d.indexOf("?(")){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");this._walk(d,y,t,n,o,a,i,(function(e,t,n,r,o,a,i,s){l._eval(t.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,"$1"),r[e],e,o,a,i)&&m(l._trace(v(e,n),r,o,a,i,s,!0))}))}else if("("===d[0]){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");m(this._trace(v(this._eval(d,t,n[n.length-1],n.slice(0,-1),o,a),y),t,n,o,a,i,s))}else if("@"===d[0]){var b=!1,k=d.slice(1,-2);switch(k){case"scalar":t&&["object","function"].includes(r(t))||(b=!0);break;case"boolean":case"string":case"undefined":case"function":r(t)===k&&(b=!0);break;case"integer":!Number.isFinite(t)||t%1||(b=!0);break;case"number":Number.isFinite(t)&&(b=!0);break;case"nonFinite":"number"!=typeof t||Number.isFinite(t)||(b=!0);break;case"object":t&&r(t)===k&&(b=!0);break;case"array":Array.isArray(t)&&(b=!0);break;case"other":b=this.currOtherTypeCallback(t,n,o,a);break;case"null":null===t&&(b=!0);break;default:throw new TypeError("Unknown value type "+k)}if(b)return c={path:n,value:t,parent:o,parentProperty:a},this._handleCallback(c,i,"value"),c}else if("`"===d[0]&&t&&h.call(t,d.slice(1))){var w=d.slice(1);m(this._trace(y,t[w],p(n,w),t,w,i,s,!0))}else if(d.includes(",")){var O,E=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=f(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}(d.split(","));try{for(E.s();!(O=E.n()).done;){var S=O.value;m(this._trace(v(S,y),t,n,o,a,i,!0))}}catch(e){E.e(e)}finally{E.f()}}else!u&&t&&h.call(t,d)&&m(this._trace(y,t[d],p(n,d),t,d,i,s,!0))}if(this._hasParentSelector)for(var T=0;T<g.length;T++){var _=g[T];if(_&&_.isParentSelector){var x=this._trace(_.expr,t,_.path,o,a,i,s);if(Array.isArray(x)){g[T]=x[0];for(var A=x.length,R=1;R<A;R++)T++,g.splice(T,0,x[R])}else g[T]=x}}return g},g.prototype._walk=function(e,t,n,o,a,i,s,u){if(Array.isArray(n))for(var c=n.length,l=0;l<c;l++)u(l,e,t,n,o,a,i,s);else n&&"object"===r(n)&&Object.keys(n).forEach((function(r){u(r,e,t,n,o,a,i,s)}))},g.prototype._slice=function(e,t,n,r,o,a,i){if(Array.isArray(n)){var s=n.length,u=e.split(":"),c=u[2]&&Number.parseInt(u[2])||1,l=u[0]&&Number.parseInt(u[0])||0,f=u[1]&&Number.parseInt(u[1])||s;l=l<0?Math.max(0,l+s):Math.min(s,l),f=f<0?Math.max(0,f+s):Math.min(s,f);for(var d=[],h=l;h<f;h+=c)this._trace(v(h,t),n,r,o,a,i,!0).forEach((function(e){d.push(e)}));return d}},g.prototype._eval=function(e,t,n,r,o,a){e.includes("@parentProperty")&&(this.currSandbox._$_parentProperty=a,e=e.replace(/@parentProperty/g,"_$_parentProperty")),e.includes("@parent")&&(this.currSandbox._$_parent=o,e=e.replace(/@parent/g,"_$_parent")),e.includes("@property")&&(this.currSandbox._$_property=n,e=e.replace(/@property/g,"_$_property")),e.includes("@path")&&(this.currSandbox._$_path=g.toPathString(r.concat([n])),e=e.replace(/@path/g,"_$_path")),e.includes("@root")&&(this.currSandbox._$_root=this.json,e=e.replace(/@root/g,"_$_root")),/@([\t-\r \)\.\[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])/.test(e)&&(this.currSandbox._$_v=t,e=e.replace(/@([\t-\r \)\.\[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])/g,"_$_v$1"));try{return this.vm.runInNewContext(e,this.currSandbox)}catch(t){throw console.log(t),new Error("jsonPath: "+t.message+": "+e)}},g.cache={},g.toPathString=function(e){for(var t=e,n=t.length,r="$",o=1;o<n;o++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(t[o])||(r+=/^[\*0-9]+$/.test(t[o])?"["+t[o]+"]":"['"+t[o]+"']");return r},g.toPointer=function(e){for(var t=e,n=t.length,r="",o=1;o<n;o++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(t[o])||(r+="/"+t[o].toString().replace(/~/g,"~0").replace(/\//g,"~1"));return r},g.toPathArray=function(e){var t=g.cache;if(t[e])return t[e].concat();var n=[],r=e.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/g,";$&;").replace(/['\[](\??\((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\))['\]]/g,(function(e,t){return"[#"+(n.push(t)-1)+"]"})).replace(/\[["']((?:(?!['\]])[\s\S])*)["']\]/g,(function(e,t){return"['"+t.replace(/\./g,"%@%").replace(/~/g,"%%@@%%")+"']"})).replace(/~/g,";~;").replace(/["']?\.["']?(?!(?:(?!\[)[\s\S])*\])|\[["']?/g,";").replace(/%@%/g,".").replace(/%%@@%%/g,"~").replace(/(?:;)?(\^+)(?:;)?/g,(function(e,t){return";"+t.split("").join(";")+";"})).replace(/;;;|;;/g,";..;").replace(/;$|'?\]|'$/g,"").split(";").map((function(e){var t=e.match(/#([0-9]+)/);return t&&t[1]?n[t[1]]:e}));return t[e]=r,t[e].concat()},g.prototype.vm={runInNewContext:function(e,t){var n=Object.keys(t),r=[];!function(e,n,r){for(var o=e.length,a=0;a<o;a++)i=e[a],"function"==typeof t[i]&&n.push(e.splice(a--,1)[0]);var i}(n,r);var o=n.map((function(e,n){return t[e]})),a=r.reduce((function(e,n){var r=t[n].toString();return/function/.test(r)||(r="function "+r),"var "+n+"="+r+";"+e}),"");/(["'])use strict\1/.test(e=a+e)||n.includes("arguments")||(e="var arguments = undefined;"+e);var i=(e=e.replace(/;[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/,"")).lastIndexOf(";"),u=i>-1?e.slice(0,i+1)+" return "+e.slice(i+1):" return "+e;return s(Function,l(n).concat([u])).apply(void 0,l(o))}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r=n(625);OktaAuth=r}();
2
+ var OktaAuth;!function(){var e={7228:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},2858:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},3646:function(e,t,n){var r=n(7228);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},1506:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},4575:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},9100:function(e,t,n){var r=n(9489),o=n(7067);function a(t,n,i){return o()?(e.exports=a=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=a=function(e,t,n){var o=[null];o.push.apply(o,t);var a=new(Function.bind.apply(e,o));return n&&r(a,n.prototype),a},e.exports.default=e.exports,e.exports.__esModule=!0),a.apply(null,arguments)}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},3913:function(e){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)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},9713:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},6525:function(e,t,n){var r=n(8331);function o(t,n,a){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=o=Reflect.get,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var o=r(e,t);if(o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(n):a.value}},e.exports.default=e.exports,e.exports.__esModule=!0),o(t,n,a||t)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},9754:function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},2205:function(e,t,n){var r=n(9489);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},5318:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},430:function(e){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.default=e.exports,e.exports.__esModule=!0},7067:function(e){e.exports=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}},e.exports.default=e.exports,e.exports.__esModule=!0},6860:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},3884:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){u=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw o}}return a}},e.exports.default=e.exports,e.exports.__esModule=!0},521:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},8206:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},8585:function(e,t,n){var r=n(8).default,o=n(1506);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},9489:function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},3038:function(e,t,n){var r=n(2858),o=n(3884),a=n(379),i=n(521);e.exports=function(e,t){return r(e)||o(e,t)||a(e,t)||i()},e.exports.default=e.exports,e.exports.__esModule=!0},8331:function(e,t,n){var r=n(9754);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e},e.exports.default=e.exports,e.exports.__esModule=!0},319:function(e,t,n){var r=n(3646),o=n(6860),a=n(379),i=n(8206);e.exports=function(e){return r(e)||o(e)||a(e)||i()},e.exports.default=e.exports,e.exports.__esModule=!0},8:function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=t=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},379:function(e,t,n){var r=n(7228);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},5957:function(e,t,n){var r=n(9754),o=n(9489),a=n(430),i=n(9100);function u(t){var n="function"==typeof Map?new Map:void 0;return e.exports=u=function(e){if(null===e||!a(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return i(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0,u(t)}e.exports=u,e.exports.default=e.exports,e.exports.__esModule=!0},7757:function(e,t,n){e.exports=n(5666)},3615:function(e,t,n){"use strict";var r=n(4575),o=n(3913),a=n(2205),i=n(8585),u=n(9754);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=function(e){a(c,e);var t,n,s=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=u(t);if(n){var o=u(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return i(this,e)});function c(e){var t;return r(this,c),(t=s.call(this,e||"Promise was canceled")).name="CancelError",t}return o(c,[{key:"isCanceled",get:function(){return!0}}]),c}(n(5957)(Error)),l=function(){function e(t){var n=this;r(this,e),this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((function(e,r){n._reject=r;var o=function(e){if(!n._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");n._cancelHandlers.push(e)};return Object.defineProperties(o,{shouldReject:{get:function(){return n._rejectOnCancel},set:function(e){n._rejectOnCancel=e}}}),t((function(t){n._isCanceled&&o.shouldReject||(n._isPending=!1,e(t))}),(function(e){n._isPending=!1,r(e)}),o)}))}return o(e,[{key:"then",value:function(e,t){return this._promise.then(e,t)}},{key:"catch",value:function(e){return this._promise.catch(e)}},{key:"finally",value:function(e){return this._promise.finally(e)}},{key:"cancel",value:function(e){if(this._isPending&&!this._isCanceled){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){u=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw a}}}}(this._cancelHandlers);try{for(n.s();!(t=n.n()).done;)(0,t.value)()}catch(e){n.e(e)}finally{n.f()}}catch(e){return void this._reject(e)}this._rejectOnCancel&&this._reject(new c(e))}}},{key:"isCanceled",get:function(){return this._isCanceled}}],[{key:"fn",value:function(t){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return new e((function(e,n,o){r.push(o),t.apply(void 0,r).then(e,n)}))}}}]),e}();Object.setPrototypeOf(l.prototype,Promise.prototype),e.exports=l,e.exports.CancelError=c},3269:function(e,t,n){"use strict";var r=n(5318);t.AuthStateManager=t.INITIAL_AUTH_STATE=void 0;var o=r(n(7757)),a=r(n(4575)),i=r(n(3913)),u=r(n(3615)),s=n(5705),c=n(8965),l=n(2231),f=r(n(1673));t.INITIAL_AUTH_STATE=null;var d={updateAuthStatePromise:null,canceledTimes:0},h="authStateChange",p=function(){function e(t){var n=this;if((0,a.default)(this,e),!t.emitter)throw new s.AuthSdkError("Emitter should be initialized before AuthStateManager");this._sdk=t,this._pending=Object.assign({},d),this._authState=null,this._logOptions={},this._prevAuthState=null,this._transformQueue=new f.default({quiet:!0}),t.tokenManager.on(l.EVENT_ADDED,(function(e,t){n._setLogOptions({event:l.EVENT_ADDED,key:e,token:t}),n.updateAuthState()})),t.tokenManager.on(l.EVENT_REMOVED,(function(e,t){n._setLogOptions({event:l.EVENT_REMOVED,key:e,token:t}),n.updateAuthState()}))}return(0,i.default)(e,[{key:"_setLogOptions",value:function(e){this._logOptions=e}},{key:"getAuthState",value:function(){return this._authState}},{key:"getPreviousAuthState",value:function(){return this._prevAuthState}},{key:"updateAuthState",value:function(){return e=this,t=void 0,n=void 0,r=o.default.mark((function e(){var t,n,r,a,i,s,l,f=this;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this._sdk.options,n=t.transformAuthState,r=t.devMode,a=function(e){var t=f._logOptions,n=t.event,r=t.key,o=t.token;(0,c.getConsole)().group("OKTA-AUTH-JS:updateAuthState: Event:".concat(n," Status:").concat(e)),(0,c.getConsole)().log(r,o),(0,c.getConsole)().log("Current authState",f._authState),(0,c.getConsole)().groupEnd(),f._logOptions={}},i=function(e){var t,n;n=e,(t=f._authState)&&t.isAuthenticated===n.isAuthenticated&&JSON.stringify(t.idToken)===JSON.stringify(n.idToken)&&JSON.stringify(t.accessToken)===JSON.stringify(n.accessToken)&&t.error===n.error?r&&a("unchanged"):(f._prevAuthState=f._authState,f._authState=e,f._sdk.emitter.emit(h,Object.assign({},e)),r&&a("emitted"))},s=function e(t){return f._pending.updateAuthStatePromise.then((function(){var n=f._pending.updateAuthStatePromise;return n&&n!==t?e(n):f.getAuthState()}))},!this._pending.updateAuthStatePromise){e.next=11;break}if(!(this._pending.canceledTimes>=10)){e.next=10;break}return r&&a("terminated"),e.abrupt("return",s(this._pending.updateAuthStatePromise));case 10:this._pending.updateAuthStatePromise.cancel();case 11:return l=new u.default((function(e,t,o){o.shouldReject=!1,o((function(){f._pending.updateAuthStatePromise=null,f._pending.canceledTimes=f._pending.canceledTimes+1,r&&a("canceled")}));var u=function(t){l.isCanceled?e():(i(t),e(),f._pending=Object.assign({},d))};f._sdk.isAuthenticated().then((function(){if(l.isCanceled)e();else{var t=f._sdk.tokenManager.getTokensSync(),r=t.accessToken,o=t.idToken,a=t.refreshToken,i={accessToken:r,idToken:o,refreshToken:a,isAuthenticated:!(!r||!o)};(n?f._transformQueue.push(n,null,f._sdk,i):Promise.resolve(i)).then((function(e){return u(e)})).catch((function(e){return u({accessToken:r,idToken:o,refreshToken:a,isAuthenticated:!1,error:e})}))}}))})),this._pending.updateAuthStatePromise=l,e.abrupt("return",s(l));case 14:case"end":return e.stop()}}),e,this)})),new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}));var e,t,n,r}},{key:"subscribe",value:function(e){this._sdk.emitter.on(h,e)}},{key:"unsubscribe",value:function(e){this._sdk.emitter.off(h,e)}}]),e}();t.AuthStateManager=p},625:function(e,t,n){"use strict";var r=n(5318),o=n(8);t.default=void 0;var a=r(n(7757)),i=r(n(4575)),u=r(n(3913)),s=I(n(3754)),c=n(7847),l=r(n(6973)),f=n(3427),d=n(6496),h=I(n(9426)),p=I(n(5637)),v=I(n(2814)),g=r(n(7501)),y=n(8965),m=n(2231),b=n(2043),k=n(2924),w=r(n(1673)),O=r(n(792)),S=n(3269),E=n(500),T=r(n(1796)),_=n(9856),A=n(6141),x=n(463),R=n(5406),P=n(5037),j=n(4456),M=r(n(4279));function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(C=function(e){return e?n:t})(e)}function I(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=C(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var u=a?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}var D=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))},N=function(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},U=function(){function e(t){var n=this;(0,i.default)(this,e);var r=this.options=(0,_.buildOptions)(t);this.storageManager=new E.StorageManager(r.storageManager,r.cookies,r.storageUtil),this.transactionManager=new T.default(Object.assign({storageManager:this.storageManager},r.transactionManager)),this._oktaUserAgent=new R.OktaUserAgent,this.tx={status:c.transactionStatus.bind(null,this),resume:c.resumeTransaction.bind(null,this),exists:Object.assign(c.transactionExists.bind(null,this),{_get:function(e){return r.storageUtil.storage.get(e)}}),introspect:c.introspectAuthn.bind(null,this)},this.pkce={DEFAULT_CODE_CHALLENGE_METHOD:l.default.DEFAULT_CODE_CHALLENGE_METHOD,generateVerifier:l.default.generateVerifier,computeChallenge:l.default.computeChallenge},Object.assign(this.options.storageUtil,{getPKCEStorage:this.storageManager.getLegacyPKCEStorage.bind(this.storageManager),getHttpCache:this.storageManager.getHttpCache.bind(this.storageManager)}),this._pending={handleLogin:!1},(0,h.isBrowser)()&&(this.options=Object.assign(this.options,{redirectUri:(0,y.toAbsoluteUrl)(t.redirectUri,window.location.origin)})),t.maxClockSkew||0===t.maxClockSkew?this.options.maxClockSkew=t.maxClockSkew:this.options.maxClockSkew=s.DEFAULT_MAX_CLOCK_SKEW,this.options.ignoreLifetime=!!t.ignoreLifetime,this.session={close:f.closeSession.bind(null,this),exists:f.sessionExists.bind(null,this),get:f.getSession.bind(null,this),refresh:f.refreshSession.bind(null,this),setCookieAndRedirect:f.setCookieAndRedirect.bind(null,this)},this._tokenQueue=new w.default;var o=function(e){return w.default.prototype.push.bind(n._tokenQueue,e,null)},a=o(d.getWithRedirect.bind(null,this)),u=Object.assign(a,{_setLocation:function(e){window.location=e}}),p=o(d.parseFromUrl.bind(null,this)),v=Object.assign(p,{_getHistory:function(){return window.history},_getLocation:function(){return window.location},_getDocument:function(){return window.document}});this.token={prepareTokenParams:d.prepareTokenParams.bind(null,this),exchangeCodeForTokens:d.exchangeCodeForTokens.bind(null,this),getWithoutPrompt:d.getWithoutPrompt.bind(null,this),getWithPopup:d.getWithPopup.bind(null,this),getWithRedirect:u,parseFromUrl:v,decode:d.decodeToken,revoke:d.revokeToken.bind(null,this),renew:d.renewToken.bind(null,this),renewTokensWithRefresh:d.renewTokensWithRefresh.bind(null,this),renewTokens:d.renewTokens.bind(null,this),getUserInfo:d.getUserInfo.bind(null,this),verify:d.verifyToken.bind(null,this),isLoginRedirect:d.isLoginRedirect.bind(null,this)};var g=["decode","isLoginRedirect","getWithRedirect","parseFromUrl"];Object.keys(this.token).forEach((function(e){if(!(g.indexOf(e)>=0)){var t=n.token[e];n.token[e]=w.default.prototype.push.bind(n._tokenQueue,t,null)}}));var P=A.startTransaction.bind(null,this);this.idx={interact:A.interact.bind(null,this),introspect:A.introspect.bind(null,this),authenticate:A.authenticate.bind(null,this),register:A.register.bind(null,this),start:P,startTransaction:P,poll:A.poll.bind(null,this),proceed:A.proceed.bind(null,this),cancel:A.cancel.bind(null,this),recoverPassword:A.recoverPassword.bind(null,this),handleInteractionCodeRedirect:A.handleInteractionCodeRedirect.bind(null,this),isInteractionRequired:d.isInteractionRequired.bind(null,this),isInteractionRequiredError:d.isInteractionRequiredError,handleEmailVerifyCallback:A.handleEmailVerifyCallback.bind(null,this),isEmailVerifyCallback:A.isEmailVerifyCallback,parseEmailVerifyCallback:A.parseEmailVerifyCallback,isEmailVerifyCallbackError:A.isEmailVerifyCallbackError,getSavedTransactionMeta:j.getSavedTransactionMeta.bind(null,this),createTransactionMeta:j.createTransactionMeta.bind(null,this),getTransactionMeta:j.getTransactionMeta.bind(null,this),saveTransactionMeta:j.saveTransactionMeta.bind(null,this),clearTransactionMeta:j.clearTransactionMeta.bind(null,this),isTransactionMetaValid:j.isTransactionMetaValid,setFlow:function(e){n.options.flow=e},getFlow:function(){return n.options.flow},canProceed:A.canProceed.bind(null,this),unlockAccount:A.unlockAccount.bind(null,this)},(0,x.setGlobalRequestInterceptor)((0,x.createGlobalRequestInterceptor)(this)),this.http={setRequestHeader:k.setRequestHeader.bind(null,this)},this.fingerprint=O.default.bind(null,this),this.emitter=new M.default,this.tokenManager=new m.TokenManager(this,t.tokenManager),this.authStateManager=new S.AuthStateManager(this),this.serviceManager=new b.ServiceManager(this,t.services)}return(0,u.default)(e,[{key:"start",value:function(){this.tokenManager.start(),this.token.isLoginRedirect()||this.authStateManager.updateAuthState(),this.serviceManager.start()}},{key:"stop",value:function(){this.tokenManager.stop(),this.serviceManager.stop()}},{key:"setHeaders",value:function(e){this.options.headers=Object.assign({},this.options.headers,e)}},{key:"signIn",value:function(e){return D(this,void 0,void 0,a.default.mark((function t(){return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.signInWithCredentials(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"signInWithCredentials",value:function(e){return D(this,void 0,void 0,a.default.mark((function t(){var n,r=this;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=(0,y.clone)(e||{}),n=function(t){return delete e.sendFingerprint,(0,c.postToTransaction)(r,"/api/v1/authn",e,t)},e.sendFingerprint){t.next=4;break}return t.abrupt("return",n());case 4:return t.abrupt("return",this.fingerprint().then((function(e){return n({headers:{"X-Device-Fingerprint":e}})})));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"signInWithRedirect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return D(this,void 0,void 0,a.default.mark((function t(){var n,r,o;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.originalUri,r=N(e,["originalUri"]),!this._pending.handleLogin){t.next=3;break}return t.abrupt("return");case 3:return this._pending.handleLogin=!0,t.prev=4,n&&this.setOriginalUri(n),o=Object.assign({scopes:this.options.scopes||["openid","email","profile"]},r),t.next=9,this.token.getWithRedirect(o);case 9:return t.prev=9,this._pending.handleLogin=!1,t.finish(9);case 12:case"end":return t.stop()}}),t,this,[[4,,9,12]])})))}},{key:"closeSession",value:function(){var e=this;return this.session.close().then((function(){return D(e,void 0,void 0,a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.tokenManager.clear();case 1:case"end":return e.stop()}}),e,this)})))})).catch((function(e){if("AuthApiError"===e.name&&"E0000007"===e.errorCode)return null;throw e}))}},{key:"revokeAccessToken",value:function(e){return D(this,void 0,void 0,a.default.mark((function t(){var n;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=6;break}return t.next=3,this.tokenManager.getTokens();case 3:e=t.sent.accessToken,n=this.tokenManager.getStorageKeyByType("accessToken"),this.tokenManager.remove(n);case 6:if(e){t.next=8;break}return t.abrupt("return",Promise.resolve(null));case 8:return t.abrupt("return",this.token.revoke(e));case 9:case"end":return t.stop()}}),t,this)})))}},{key:"revokeRefreshToken",value:function(e){return D(this,void 0,void 0,a.default.mark((function t(){var n;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=6;break}return t.next=3,this.tokenManager.getTokens();case 3:e=t.sent.refreshToken,n=this.tokenManager.getStorageKeyByType("refreshToken"),this.tokenManager.remove(n);case 6:if(e){t.next=8;break}return t.abrupt("return",Promise.resolve(null));case 8:return t.abrupt("return",this.token.revoke(e));case 9:case"end":return t.stop()}}),t,this)})))}},{key:"getSignOutRedirectUrl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.idToken,n=e.postLogoutRedirectUri,r=e.state;if(t||(t=this.tokenManager.getTokensSync().idToken),!t)return"";n||(n=this.options.postLogoutRedirectUri);var o=(0,d.getOAuthUrls)(this).logoutUrl,a=t.idToken,i=o+"?id_token_hint="+encodeURIComponent(a);return n&&(i+="&post_logout_redirect_uri="+encodeURIComponent(n)),r&&(i+="&state="+encodeURIComponent(r)),i}},{key:"signOut",value:function(e){return D(this,void 0,void 0,a.default.mark((function t(){var n,r,o,i,u,s,c,l;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=Object.assign({},e),n=window.location.origin,r=window.location.href,o=e.postLogoutRedirectUri||this.options.postLogoutRedirectUri||n,i=e.accessToken,u=e.refreshToken,s=!1!==e.revokeAccessToken,(c=!1!==e.revokeRefreshToken)&&void 0===u&&(u=this.tokenManager.getTokensSync().refreshToken),s&&void 0===i&&(i=this.tokenManager.getTokensSync().accessToken),e.idToken||(e.idToken=this.tokenManager.getTokensSync().idToken),!c||!u){t.next=14;break}return t.next=14,this.revokeRefreshToken(u);case 14:if(!s||!i){t.next=17;break}return t.next=17,this.revokeAccessToken(i);case 17:if(l=this.getSignOutRedirectUrl(Object.assign(Object.assign({},e),{postLogoutRedirectUri:o}))){t.next=22;break}return t.abrupt("return",this.closeSession().then((function(){o===r?window.location.reload():window.location.assign(o)})));case 22:e.clearTokensBeforeRedirect?this.tokenManager.clear():this.tokenManager.addPendingRemoveFlags(),window.location.assign(l);case 24:case"end":return t.stop()}}),t,this)})))}},{key:"webfinger",value:function(e){var t="/.well-known/webfinger"+(0,y.toQueryString)(e);return(0,k.get)(this,t,{headers:{Accept:"application/jrd+json"}})}},{key:"isAuthenticated",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return D(this,void 0,void 0,a.default.mark((function t(){var n,r,o,i,u,s,c,l,f;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.tokenManager.getOptions(),r=n.autoRenew,o=n.autoRemove,i=e.onExpiredToken?"renew"===e.onExpiredToken:r,u=e.onExpiredToken?"remove"===e.onExpiredToken:o,s=this.tokenManager.getTokensSync(),!(c=s.accessToken)||!this.tokenManager.hasExpired(c)){t.next=18;break}if(c=void 0,!i){t.next=17;break}return t.prev=7,t.next=10,this.tokenManager.renew("accessToken");case 10:c=t.sent,t.next=15;break;case 13:t.prev=13,t.t0=t.catch(7);case 15:t.next=18;break;case 17:u&&this.tokenManager.remove("accessToken");case 18:if(l=this.tokenManager.getTokensSync(),!(f=l.idToken)||!this.tokenManager.hasExpired(f)){t.next=33;break}if(f=void 0,!i){t.next=32;break}return t.prev=22,t.next=25,this.tokenManager.renew("idToken");case 25:f=t.sent,t.next=30;break;case 28:t.prev=28,t.t1=t.catch(22);case 30:t.next=33;break;case 32:u&&this.tokenManager.remove("idToken");case 33:return t.abrupt("return",!(!c||!f));case 34:case"end":return t.stop()}}),t,this,[[7,13],[22,28]])})))}},{key:"getUser",value:function(){return D(this,void 0,void 0,a.default.mark((function e(){var t,n,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.tokenManager.getTokensSync(),n=t.idToken,r=t.accessToken,e.abrupt("return",this.token.getUserInfo(r,n));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"getIdToken",value:function(){var e=this.tokenManager.getTokensSync().idToken;return e?e.idToken:void 0}},{key:"getAccessToken",value:function(){var e=this.tokenManager.getTokensSync().accessToken;return e?e.accessToken:void 0}},{key:"getRefreshToken",value:function(){var e=this.tokenManager.getTokensSync().refreshToken;return e?e.refreshToken:void 0}},{key:"storeTokensFromRedirect",value:function(){return D(this,void 0,void 0,a.default.mark((function e(){var t,n;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.token.parseFromUrl();case 2:t=e.sent,n=t.tokens,this.tokenManager.setTokens(n);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"setOriginalUri",value:function(e,t){g.default.getSessionStorage().setItem(s.REFERRER_PATH_STORAGE_KEY,e),(t=t||this.options.state)&&this.storageManager.getOriginalUriStorage().setItem(t,e)}},{key:"getOriginalUri",value:function(e){if(e=e||this.options.state){var t=this.storageManager.getOriginalUriStorage().getItem(e);if(t)return t}var n=g.default.getSessionStorage();return n&&n.getItem(s.REFERRER_PATH_STORAGE_KEY)||void 0}},{key:"removeOriginalUri",value:function(e){if(g.default.getSessionStorage().removeItem(s.REFERRER_PATH_STORAGE_KEY),e=e||this.options.state){var t=this.storageManager.getOriginalUriStorage();t.removeItem&&t.removeItem(e)}}},{key:"isLoginRedirect",value:function(){return(0,d.isLoginRedirect)(this)}},{key:"handleLoginRedirect",value:function(e,t){return D(this,void 0,void 0,a.default.mark((function n(){var r,o,i;return a.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=this.options.state,!e){n.next=6;break}this.tokenManager.setTokens(e),t=t||this.getOriginalUri(this.options.state),n.next=25;break;case 6:if(!this.isLoginRedirect()){n.next=24;break}return n.prev=7,n.next=10,(0,P.parseOAuthResponseFromUrl)(this,{});case 10:return o=n.sent,r=o.state,t=t||this.getOriginalUri(r),n.next=15,this.storeTokensFromRedirect();case 15:n.next=22;break;case 17:return n.prev=17,n.t0=n.catch(7),n.next=21,this.authStateManager.updateAuthState();case 21:throw n.t0;case 22:n.next=25;break;case 24:return n.abrupt("return");case 25:return n.next=27,this.authStateManager.updateAuthState();case 27:if(this.removeOriginalUri(r),!(i=this.options.restoreOriginalUri)){n.next=34;break}return n.next=32,i(this,t);case 32:n.next=35;break;case 34:t&&window.location.replace(t);case 35:case"end":return n.stop()}}),n,this,[[7,17]])})))}},{key:"isPKCE",value:function(){return!!this.options.pkce}},{key:"hasResponseType",value:function(e){return Array.isArray(this.options.responseType)&&this.options.responseType.length?this.options.responseType.indexOf(e)>=0:this.options.responseType===e}},{key:"isAuthorizationCodeFlow",value:function(){return this.hasResponseType("code")}},{key:"getIssuerOrigin",value:function(){return this.options.issuer.split("/oauth2/")[0]}},{key:"forgotPassword",value:function(e){return(0,c.postToTransaction)(this,"/api/v1/authn/recovery/password",e)}},{key:"unlockAccount",value:function(e){return(0,c.postToTransaction)(this,"/api/v1/authn/recovery/unlock",e)}},{key:"verifyRecoveryToken",value:function(e){return(0,c.postToTransaction)(this,"/api/v1/authn/recovery/token",e)}},{key:"invokeApiMethod",value:function(e){return D(this,void 0,void 0,a.default.mark((function t(){var n;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.accessToken){t.next=5;break}return t.next=3,this.tokenManager.getTokens();case 3:n=t.sent.accessToken,e.accessToken=null==n?void 0:n.accessToken;case 5:return t.abrupt("return",(0,k.httpRequest)(this,e));case 6:case"end":return t.stop()}}),t,this)})))}}]),e}();U.features=U.prototype.features=h,U.crypto=p,U.webauthn=v,Object.assign(U,{constants:s});var L=U;t.default=L,e.exports=t.default},5406:function(e,t,n){"use strict";var r=n(5318);t.OktaUserAgent=void 0;var o=r(n(4575)),a=r(n(3913)),i=n(9426),u=function(){function e(){(0,o.default)(this,e),this.environments=["okta-auth-js/".concat("6.3.2")]}return(0,a.default)(e,[{key:"addEnvironment",value:function(e){this.environments.push(e)}},{key:"getHttpHeader",value:function(){return this.maybeAddNodeEnvironment(),{"X-Okta-User-Agent-Extended":this.environments.join(" ")}}},{key:"getVersion",value:function(){return"6.3.2"}},{key:"maybeAddNodeEnvironment",value:function(){if(!(0,i.isBrowser)()&&process&&process.versions){var e=process.versions.node;this.environments.push("nodejs/".concat(e))}}}]),e}();t.OktaUserAgent=u},1673:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(3913)),i=n(8965),u=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{quiet:!1};(0,o.default)(this,e),this.queue=[],this.running=!1,this.options=t}return(0,a.default)(e,[{key:"push",value:function(e,t){for(var n=this,r=arguments.length,o=new Array(r>2?r-2:0),a=2;a<r;a++)o[a-2]=arguments[a];return new Promise((function(r,a){n.queue.length>0&&!1!==n.options.quiet&&(0,i.warn)("Async method is being called but another async method is already running. The new method will be delayed until the previous method completes."),n.queue.push({method:e,thisObject:t,args:o,resolve:r,reject:a}),n.run()}))}},{key:"run",value:function(){var e=this;if(!this.running&&0!==this.queue.length){this.running=!0;var t=this.queue.shift(),n=t.method.apply(t.thisObject,t.args);(0,i.isPromise)(n)?n.then(t.resolve,t.reject).finally((function(){e.running=!1,e.run()})):(t.resolve(n),this.running=!1,this.run())}}}]),e}(),s=u;t.default=s,e.exports=t.default},472:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(7948)),u=function(){function e(t,n){if((0,o.default)(this,e),!t)throw new i.default('"storage" is required');if("string"!=typeof n||!n.length)throw new i.default('"storageName" is required');this.storageName=n,this.storageProvider=t}return(0,a.default)(e,[{key:"getItem",value:function(e){return this.getStorage()[e]}},{key:"setItem",value:function(e,t){return this.updateStorage(e,t)}},{key:"removeItem",value:function(e){return this.clearStorage(e)}},{key:"getStorage",value:function(){var e=this.storageProvider.getItem(this.storageName);e=e||"{}";try{return JSON.parse(e)}catch(e){throw new i.default("Unable to parse storage string: "+this.storageName)}}},{key:"setStorage",value:function(e){try{var t=e?JSON.stringify(e):"{}";this.storageProvider.setItem(this.storageName,t)}catch(e){throw new i.default("Unable to set storage: "+this.storageName)}}},{key:"clearStorage",value:function(e){if(e){var t=this.getStorage();delete t[e],this.setStorage(t)}else this.storageProvider.removeItem?this.storageProvider.removeItem(this.storageName):this.setStorage()}},{key:"updateStorage",value:function(e,t){var n=this.getStorage();n[e]=t,this.setStorage(n)}}]),e}();t.default=u,e.exports=t.default},2043:function(e,t,n){"use strict";var r=n(5318);t.ServiceManager=void 0;var o=r(n(319)),a=r(n(4575)),i=r(n(3913)),u=n(8437),s=n(5139),c=n(9426);function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){u=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw a}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.default)(this,e),this.sdk=t;var o=t.tokenManager.getOptions(),i=o.autoRenew,u=o.autoRemove,s=o.syncStorage;this.options=Object.assign({},e.defaultOptions,{autoRenew:i,autoRemove:u,syncStorage:s},r),this.started=!1,this.services=new Map,this.onLeaderDuplicate=this.onLeaderDuplicate.bind(this),this.onLeader=this.onLeader.bind(this),e.knownServices.forEach((function(e){var t=n.createService(e);t&&n.services.set(e,t)}))}return(0,i.default)(e,[{key:"onLeader",value:function(){this.started&&this.startServices()}},{key:"onLeaderDuplicate",value:function(){}},{key:"isLeader",value:function(){var e;return!!(null===(e=this.elector)||void 0===e?void 0:e.isLeader)}},{key:"hasLeader",value:function(){var e;return null===(e=this.elector)||void 0===e?void 0:e.hasLeader}},{key:"isLeaderRequired",value:function(){return(0,o.default)(this.services.values()).some((function(e){return e.requiresLeadership()}))}},{key:"start",value:function(){this.started&&this.stop(),this.isLeaderRequired()&&this.startElector(),this.startServices(),this.started=!0}},{key:"stop",value:function(){this.stopElector(),this.stopServices(),this.started=!1}},{key:"getService",value:function(e){return this.services.get(e)}},{key:"startServices",value:function(){var e,t=l(this.services.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;n.canStart()&&!n.isStarted()&&(!n.requiresLeadership()||this.isLeader())&&n.start()}}catch(e){t.e(e)}finally{t.f()}}},{key:"stopServices",value:function(){var e,t=l(this.services.values());try{for(t.s();!(e=t.n()).done;)e.value.stop()}catch(e){t.e(e)}finally{t.f()}}},{key:"startElector",value:function(){if(this.stopElector(),e.canUseLeaderElection()){if(!this.channel){var t=this.options.broadcastChannelName;this.channel=new u.BroadcastChannel(t)}this.elector||(this.elector=(0,u.createLeaderElection)(this.channel),this.elector.onduplicate=this.onLeaderDuplicate,this.elector.awaitLeadership().then(this.onLeader))}}},{key:"stopElector",value:function(){var e,t;this.elector&&(null===(e=this.elector)||void 0===e||e.die(),this.elector=void 0,null===(t=this.channel)||void 0===t||t.close(),this.channel=void 0)}},{key:"createService",value:function(e){var t,n=this.sdk.tokenManager;switch(e){case"autoRenew":t=new s.AutoRenewService(n,Object.assign({},this.options));break;case"syncStorage":t=new s.SyncStorageService(n,Object.assign({},this.options));break;default:throw new Error("Unknown service ".concat(e))}return t}}],[{key:"canUseLeaderElection",value:function(){return(0,c.isBrowser)()}}]),e}();t.ServiceManager=d,d.knownServices=["autoRenew","syncStorage"],d.defaultOptions={autoRenew:!0,autoRemove:!0,syncStorage:!0}},500:function(e,t,n){"use strict";var r=n(5318);t.StorageManager=void 0;var o=r(n(4575)),a=r(n(3913)),i=n(3754),u=r(n(472)),s=n(9426),c=n(8965),l=n(5705);function f(e){(0,s.isBrowser)()||e.storageProvider||e.storageProvider||(0,c.warn)("Memory storage can only support simple single user use case on server side, please provide custom storageProvider or storageKey if advanced scenarios need to be supported.")}var d=function(){function e(t,n,r){(0,o.default)(this,e),this.storageManagerOptions=t,this.cookieOptions=n,this.storageUtil=r}return(0,a.default)(e,[{key:"getOptionsForSection",value:function(e,t){return Object.assign({},this.storageManagerOptions[e],t)}},{key:"getStorage",value:function(e){if((e=Object.assign({},this.cookieOptions,e)).storageProvider)return e.storageProvider;var t=e,n=t.storageType,r=t.storageTypes;if("sessionStorage"===n&&(e.sessionCookie=!0),n&&r){var o=r.indexOf(n);o>=0&&(r=r.slice(o),n=void 0)}return n||(n=this.storageUtil.findStorageType(r)),this.storageUtil.getStorageByType(n,e)}},{key:"getTransactionStorage",value:function(e){f(e=this.getOptionsForSection("transaction",e));var t=this.getStorage(e),n=e.storageKey||i.TRANSACTION_STORAGE_NAME;return new u.default(t,n)}},{key:"getSharedTansactionStorage",value:function(e){f(e=this.getOptionsForSection("shared-transaction",e));var t=this.getStorage(e),n=e.storageKey||i.SHARED_TRANSACTION_STORAGE_NAME;return new u.default(t,n)}},{key:"getOriginalUriStorage",value:function(e){f(e=this.getOptionsForSection("original-uri",e));var t=this.getStorage(e),n=e.storageKey||i.ORIGINAL_URI_STORAGE_NAME;return new u.default(t,n)}},{key:"getIdxResponseStorage",value:function(e){var t;if((0,s.isBrowser)())try{t=this.storageUtil.getStorageByType("memory",e)}catch(e){(0,c.warn)("No response storage found, you may want to provide custom implementation for intermediate idx responses to optimize the network traffic")}else{var n=this.getTransactionStorage(e);n&&(t={getItem:function(e){var t=n.getStorage();return t&&t[e]?t[e]:null},setItem:function(e,t){var r=n.getStorage();if(!r)throw new l.AuthSdkError("Transaction has been cleared, failed to save idxState");r[e]=t,n.setStorage(r)},removeItem:function(e){var t=n.getStorage();t&&(delete t[e],n.setStorage(t))}})}return t?new u.default(t,i.IDX_RESPONSE_STORAGE_NAME):null}},{key:"getTokenStorage",value:function(e){f(e=this.getOptionsForSection("token",e));var t=this.getStorage(e),n=e.storageKey||i.TOKEN_STORAGE_NAME;return new u.default(t,n)}},{key:"getHttpCache",value:function(e){e=this.getOptionsForSection("cache",e);var t=this.getStorage(e),n=e.storageKey||i.CACHE_STORAGE_NAME;return new u.default(t,n)}},{key:"getLegacyPKCEStorage",value:function(e){e=this.getOptionsForSection("legacy-pkce",e);var t=this.getStorage(e),n=e.storageKey||i.PKCE_STORAGE_NAME;return new u.default(t,n)}},{key:"getLegacyOAuthParamsStorage",value:function(e){e=this.getOptionsForSection("legacy-oauth-params",e);var t=this.getStorage(e),n=e.storageKey||i.REDIRECT_OAUTH_PARAMS_NAME;return new u.default(t,n)}}]),e}();t.StorageManager=d},2231:function(e,t,n){"use strict";var r=n(5318);t.TokenManager=t.EVENT_ERROR=t.EVENT_REMOVED=t.EVENT_ADDED=t.EVENT_RENEWED=t.EVENT_EXPIRED=void 0;var o=r(n(7757)),a=r(n(8)),i=r(n(4575)),u=r(n(3913)),s=n(8965),c=n(5705),l=n(4736),f=n(9426),d=r(n(322)),h=n(858),p=n(3754),v=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))},g={autoRenew:!0,autoRemove:!0,syncStorage:!0,clearPendingRemoveTokens:!0,storage:void 0,expireEarlySeconds:30,storageKey:p.TOKEN_STORAGE_NAME,_storageEventDelay:0},y="expired";t.EVENT_EXPIRED=y;var m="renewed";t.EVENT_RENEWED=m;var b="added";t.EVENT_ADDED=b;var k="removed";t.EVENT_REMOVED=k;var w="error";t.EVENT_ERROR=w;var O=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((0,i.default)(this,e),this.sdk=t,this.emitter=t.emitter,!this.emitter)throw new c.AuthSdkError("Emitter should be initialized before TokenManager");n=Object.assign({},g,(0,s.removeNils)(n)),(0,f.isIE11OrLess)()&&(n._storageEventDelay=n._storageEventDelay||1e3),(0,f.isLocalhost)()||(n.expireEarlySeconds=g.expireEarlySeconds),this.options=n;var r=(0,s.removeNils)({storageKey:n.storageKey,secure:n.secure});"object"===(0,a.default)(n.storage)?r.storageProvider=n.storage:n.storage&&(r.storageType=n.storage),this.storage=t.storageManager.getTokenStorage(Object.assign(Object.assign({},r),{useSeparateCookies:!0})),this.clock=d.default.create(),this.state={expireTimeouts:{},renewPromise:null},this.on=this.emitter.on.bind(this.emitter),this.off=this.emitter.off.bind(this.emitter)}return(0,u.default)(e,[{key:"start",value:function(){this.options.clearPendingRemoveTokens&&this.clearPendingRemoveTokens(),this.setExpireEventTimeoutAll()}},{key:"stop",value:function(){this.clearExpireEventTimeoutAll()}},{key:"getOptions",value:function(){return(0,s.clone)(this.options)}},{key:"getExpireTime",value:function(e){var t=this.options.expireEarlySeconds||0;return e.expiresAt-t}},{key:"hasExpired",value:function(e){return this.getExpireTime(e)<=this.clock.now()}},{key:"emitExpired",value:function(e,t){this.emitter.emit(y,e,t)}},{key:"emitRenewed",value:function(e,t,n){this.emitter.emit(m,e,t,n)}},{key:"emitAdded",value:function(e,t){this.emitter.emit(b,e,t)}},{key:"emitRemoved",value:function(e,t){this.emitter.emit(k,e,t)}},{key:"emitError",value:function(e){this.emitter.emit(w,e)}},{key:"emitEventsForCrossTabsStorageUpdate",value:function(e,t){var n=this,r=this.getTokensFromStorageValue(t),o=this.getTokensFromStorageValue(e);Object.keys(o).forEach((function(e){var t=r[e],a=o[e];JSON.stringify(t)!==JSON.stringify(a)&&n.emitAdded(e,a)})),Object.keys(r).forEach((function(e){var t=r[e];o[e]||n.emitRemoved(e,t)}))}},{key:"clearExpireEventTimeout",value:function(e){clearTimeout(this.state.expireTimeouts[e]),delete this.state.expireTimeouts[e],this.state.renewPromise=null}},{key:"clearExpireEventTimeoutAll",value:function(){var e=this.state.expireTimeouts;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.clearExpireEventTimeout(t)}},{key:"setExpireEventTimeout",value:function(e,t){var n=this;if(!(0,h.isRefreshToken)(t)){var r=this.getExpireTime(t),o=1e3*Math.max(r-this.clock.now(),0);this.clearExpireEventTimeout(e);var a=setTimeout((function(){n.emitExpired(e,t)}),o);this.state.expireTimeouts[e]=a}}},{key:"setExpireEventTimeoutAll",value:function(){var e=this.storage.getStorage();for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];this.setExpireEventTimeout(t,n)}}},{key:"resetExpireEventTimeoutAll",value:function(){this.clearExpireEventTimeoutAll(),this.setExpireEventTimeoutAll()}},{key:"add",value:function(e,t){var n=this.storage.getStorage();(0,l.validateToken)(t),n[e]=t,this.storage.setStorage(n),this.emitAdded(e,t),this.setExpireEventTimeout(e,t)}},{key:"getSync",value:function(e){return this.storage.getStorage()[e]}},{key:"get",value:function(e){return v(this,void 0,void 0,o.default.mark((function t(){return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.getSync(e));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"getTokensSync",value:function(){var e={},t=this.storage.getStorage();return Object.keys(t).forEach((function(n){var r=t[n];(0,h.isAccessToken)(r)?e.accessToken=r:(0,h.isIDToken)(r)?e.idToken=r:(0,h.isRefreshToken)(r)&&(e.refreshToken=r)})),e}},{key:"getTokens",value:function(){return v(this,void 0,void 0,o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getTokensSync());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getStorageKeyByType",value:function(e){var t=this.storage.getStorage();return Object.keys(t).filter((function(n){var r=t[n];return(0,h.isAccessToken)(r)&&"accessToken"===e||(0,h.isIDToken)(r)&&"idToken"===e||(0,h.isRefreshToken)(r)&&"refreshToken"===e}))[0]}},{key:"getTokenType",value:function(e){if((0,h.isAccessToken)(e))return"accessToken";if((0,h.isIDToken)(e))return"idToken";if((0,h.isRefreshToken)(e))return"refreshToken";throw new c.AuthSdkError("Unknown token type")}},{key:"setTokens",value:function(e,t,n,r){var o=this,a=function(e,a){var i=o.getTokenType(a);"accessToken"===i?t&&t(e,a):"idToken"===i?n&&n(e,a):"refreshToken"===i&&r&&r(e,a)},i=function(e,t){o.emitAdded(e,t),o.setExpireEventTimeout(e,t),a(e,t)},u=function(e,t){o.clearExpireEventTimeout(e),o.emitRemoved(e,t),a(e,t)},s=["idToken","accessToken","refreshToken"],c=this.getTokensSync();s.forEach((function(t){var n=e[t];n&&(0,l.validateToken)(n,t)}));var f=s.reduce((function(t,n){var r=e[n];return r&&(t[o.getStorageKeyByType(n)||n]=r),t}),{});this.storage.setStorage(f),s.forEach((function(t){var n,r,s,l=e[t],f=c[t],d=o.getStorageKeyByType(t)||t;l&&f?(u(d,f),i(d,l),n=d,r=l,s=f,o.emitRenewed(n,r,s),o.clearExpireEventTimeout(n),o.setExpireEventTimeout(n,r),a(n,r)):l?i(d,l):f&&u(d,f)}))}},{key:"remove",value:function(e){this.clearExpireEventTimeout(e);var t=this.storage.getStorage(),n=t[e];delete t[e],this.storage.setStorage(t),this.emitRemoved(e,n)}},{key:"renewToken",value:function(e){var t;return v(this,void 0,void 0,o.default.mark((function n(){return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",null===(t=this.sdk.token)||void 0===t?void 0:t.renew(e));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"validateToken",value:function(e){return(0,l.validateToken)(e)}},{key:"renew",value:function(e){var t=this;if(this.state.renewPromise)return this.state.renewPromise;try{var n=this.getSync(e);if(!n)throw new c.AuthSdkError("The tokenManager has no token for the key: "+e)}catch(e){return Promise.reject(e)}return this.clearExpireEventTimeout(e),this.state.renewPromise=this.sdk.token.renewTokens().then((function(e){return t.setTokens(e),e[t.getTokenType(n)]})).catch((function(n){throw t.remove(e),n.tokenKey=e,t.emitError(n),n})).finally((function(){t.state.renewPromise=null})),this.state.renewPromise}},{key:"clear",value:function(){this.clearExpireEventTimeoutAll(),this.storage.clearStorage()}},{key:"clearPendingRemoveTokens",value:function(){var e=this,t=this.getTokensSync();Object.keys(t).forEach((function(n){t[n].pendingRemove&&e.remove(n)}))}},{key:"getTokensFromStorageValue",value:function(e){var t;try{t=JSON.parse(e)||{}}catch(e){t={}}return t}},{key:"updateRefreshToken",value:function(e){var t=this.getStorageKeyByType("refreshToken")||p.REFRESH_TOKEN_STORAGE_KEY,n=this.storage.getStorage();(0,l.validateToken)(e),n[t]=e,this.storage.setStorage(n)}},{key:"addPendingRemoveFlags",value:function(){var e=this.getTokensSync();Object.keys(e).forEach((function(t){e[t].pendingRemove=!0})),this.setTokens(e)}}]),e}();t.TokenManager=O},1796:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(3913)),i=n(5705),u=n(3754),s=n(858),c=n(3675),l=n(8965),f=n(2051),d=function(){function e(t){(0,o.default)(this,e),this.storageManager=t.storageManager,this.legacyWidgetSupport=!1!==t.legacyWidgetSupport,this.saveNonceCookie=!1!==t.saveNonceCookie,this.saveStateCookie=!1!==t.saveStateCookie,this.saveParamsCookie=!1!==t.saveParamsCookie,this.enableSharedStorage=!1!==t.enableSharedStorage,this.saveLastResponse=!1!==t.saveLastResponse,this.options=t}return(0,a.default)(e,[{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.storageManager.getTransactionStorage(),n=t.getStorage();if(t.clearStorage(),this.clearIdxResponse(),this.enableSharedStorage&&!1!==e.clearSharedStorage){var r=e.state||(null==n?void 0:n.state);r&&(0,f.clearTransactionFromSharedStorage)(this.storageManager,r)}this.legacyWidgetSupport&&(e.oauth&&this.clearLegacyOAuthParams(),e.pkce&&this.clearLegacyPKCE())}},{key:"save",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.storageManager.getTransactionStorage(),r=n.getStorage();if((0,s.isTransactionMeta)(r)&&!t.muteWarning&&(0,l.warn)("a saved auth transaction exists in storage. This may indicate another auth flow is already in progress."),n.setStorage(e),this.enableSharedStorage&&e.state&&(0,f.saveTransactionToSharedStorage)(this.storageManager,e.state,e),t.oauth&&(this.saveNonceCookie||this.saveStateCookie||this.saveParamsCookie)){var o=this.storageManager.getStorage({storageType:"cookie"});if(this.saveParamsCookie){var a=e.responseType,i=e.state,c=e.nonce,d=e.scopes,h=e.clientId,p=e.urls,v=e.ignoreSignature,g={responseType:a,state:i,nonce:c,scopes:d,clientId:h,urls:p,ignoreSignature:v};o.setItem(u.REDIRECT_OAUTH_PARAMS_NAME,JSON.stringify(g),null)}this.saveNonceCookie&&e.nonce&&o.setItem(u.REDIRECT_NONCE_COOKIE_NAME,e.nonce,null),this.saveStateCookie&&e.state&&o.setItem(u.REDIRECT_STATE_COOKIE_NAME,e.state,null)}}},{key:"exists",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var t=this.load(e);return!!t}catch(e){return!1}}},{key:"load",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.enableSharedStorage&&t.state&&((0,f.pruneSharedStorage)(this.storageManager),e=(0,f.loadTransactionFromSharedStorage)(this.storageManager,t.state),(0,s.isTransactionMeta)(e)))return e;var n=this.storageManager.getTransactionStorage();if(e=n.getStorage(),(0,s.isTransactionMeta)(e))return e;if(!this.legacyWidgetSupport)return null;if(t.oauth)try{var r=this.loadLegacyOAuthParams();Object.assign(e,r)}finally{this.clearLegacyOAuthParams()}if(t.pkce)try{var o=this.loadLegacyPKCE();Object.assign(e,o)}finally{this.clearLegacyPKCE()}return(0,s.isTransactionMeta)(e)?e:null}},{key:"clearLegacyPKCE",value:function(){this.storageManager.storageUtil.testStorageType("localStorage")&&this.storageManager.getLegacyPKCEStorage({storageType:"localStorage"}).clearStorage(),this.storageManager.storageUtil.testStorageType("sessionStorage")&&this.storageManager.getLegacyPKCEStorage({storageType:"sessionStorage"}).clearStorage()}},{key:"loadLegacyPKCE",value:function(){var e;if(this.storageManager.storageUtil.testStorageType("localStorage")&&(e=this.storageManager.getLegacyPKCEStorage({storageType:"localStorage"}).getStorage())&&e.codeVerifier)return e;if(this.storageManager.storageUtil.testStorageType("sessionStorage")&&(e=this.storageManager.getLegacyPKCEStorage({storageType:"sessionStorage"}).getStorage())&&e.codeVerifier)return e;throw new i.AuthSdkError("Could not load PKCE codeVerifier from storage. This may indicate the auth flow has already completed or multiple auth flows are executing concurrently.",void 0)}},{key:"clearLegacyOAuthParams",value:function(){this.storageManager.storageUtil.testStorageType("sessionStorage")&&this.storageManager.getLegacyOAuthParamsStorage({storageType:"sessionStorage"}).clearStorage(),this.storageManager.storageUtil.testStorageType("cookie")&&this.storageManager.getLegacyOAuthParamsStorage({storageType:"cookie"}).clearStorage()}},{key:"loadLegacyOAuthParams",value:function(){var e;if(this.storageManager.storageUtil.testStorageType("sessionStorage")&&(e=this.storageManager.getLegacyOAuthParamsStorage({storageType:"sessionStorage"}).getStorage()),(0,s.isOAuthTransactionMeta)(e))return e;if(this.storageManager.storageUtil.testStorageType("cookie")&&(e=this.storageManager.getLegacyOAuthParamsStorage({storageType:"cookie"}).getStorage()),(0,s.isOAuthTransactionMeta)(e))return e;throw new i.AuthSdkError("Unable to retrieve OAuth redirect params from storage")}},{key:"saveIdxResponse",value:function(e){var t=e.rawIdxResponse,n=e.requestDidSucceed;if(this.saveLastResponse){var r=this.storageManager.getIdxResponseStorage();r&&r.setStorage({rawIdxResponse:t,requestDidSucceed:n})}}},{key:"loadIdxResponse",value:function(){if(!this.saveLastResponse)return null;var e=this.storageManager.getIdxResponseStorage();if(!e)return null;var t=e.getStorage();return t&&(0,c.isRawIdxResponse)(t.rawIdxResponse)?t:null}},{key:"clearIdxResponse",value:function(){if(this.saveLastResponse){var e=this.storageManager.getIdxResponseStorage();null==e||e.clearStorage()}}}]),e}();t.default=d,e.exports=t.default},7501:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(646)),a=r(n(7948)),i=n(8965),u={getHttpCache:function(){return null},getPKCEStorage:function(){return null},browserHasLocalStorage:function(){try{var e=this.getLocalStorage();return this.testStorage(e)}catch(e){return!1}},browserHasSessionStorage:function(){try{var e=this.getSessionStorage();return this.testStorage(e)}catch(e){return!1}},testStorageType:function(e){var t=!1;switch(e){case"sessionStorage":t=this.browserHasSessionStorage();break;case"localStorage":t=this.browserHasLocalStorage();break;case"cookie":case"memory":t=!0;break;default:t=!1}return t},getStorageByType:function(e,t){var n;switch(e){case"sessionStorage":n=this.getSessionStorage();break;case"localStorage":n=this.getLocalStorage();break;case"cookie":n=this.getCookieStorage(t);break;case"memory":n=this.getInMemoryStorage();break;default:throw new a.default("Unrecognized storage option: ".concat(e))}return n},findStorageType:function(e){var t,n;return t=(e=e.slice()).shift(),(n=e.length?e[0]:null)?this.testStorageType(t)?t:((0,i.warn)("This browser doesn't support ".concat(t,". Switching to ").concat(n,".")),this.findStorageType(e)):t},getLocalStorage:function(){return localStorage},getSessionStorage:function(){return sessionStorage},getCookieStorage:function(e){var t=this,n=e.secure,r=e.sameSite,o=e.sessionCookie;if(void 0===n||void 0===r)throw new a.default('getCookieStorage: "secure" and "sameSite" options must be provided');var i={getItem:this.storage.get,setItem:function(e,a){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"2200-01-01T00:00:00.000Z";i=o?null:i,t.storage.set(e,a,i,{secure:n,sameSite:r})},removeItem:function(e){t.storage.delete(e)}};return e.useSeparateCookies?{getItem:function(e){var t=i.getItem(),n={};return Object.keys(t).forEach((function(r){0===r.indexOf(e)&&(n[r.replace("".concat(e,"_"),"")]=JSON.parse(t[r]))})),JSON.stringify(n)},setItem:function(e,t){var n=JSON.parse(this.getItem(e));t=JSON.parse(t),Object.keys(t).forEach((function(r){var o=e+"_"+r,a=JSON.stringify(t[r]);i.setItem(o,a),delete n[r]})),Object.keys(n).forEach((function(t){i.removeItem(e+"_"+t)}))},removeItem:function(e){var t=JSON.parse(this.getItem(e));Object.keys(t).forEach((function(t){i.removeItem(e+"_"+t)}))}}:i},inMemoryStore:{},getInMemoryStorage:function(){var e=this;return{getItem:function(t){return e.inMemoryStore[t]},setItem:function(t,n){e.inMemoryStore[t]=n}}},testStorage:function(e){var t="okta-test-storage";try{return e.setItem(t,t),e.removeItem(t),!0}catch(e){return!1}},storage:{set:function(e,t,n,r){var i=r.sameSite,u=r.secure;if(void 0===u||void 0===i)throw new a.default('storage.set: "secure" and "sameSite" options must be provided');var s={path:r.path||"/",secure:u,sameSite:i};return Date.parse(n)&&(s.expires=new Date(n)),o.default.set(e,t,s),this.get(e)},get:function(e){return arguments.length?o.default.get(e):o.default.get()},delete:function(e){return o.default.remove(e,{path:"/"})}}},s=u;t.default=s,e.exports=t.default},792:function(e,t,n){"use strict";t.default=function(e,t){return t=t||{},(0,o.isFingerprintSupported)()?new Promise((function(o,s){(i=document.createElement("iframe")).style.display="none",u=function(t){if(t&&t.data&&t.origin===e.getIssuerOrigin()){try{var n=JSON.parse(t.data)}catch(e){return}if(n)return"FingerprintAvailable"===n.type?o(n.fingerprint):void("FingerprintServiceReady"===n.type&&t.source.postMessage(JSON.stringify({type:"GetFingerprint"}),t.origin))}},(0,a.addListener)(window,"message",u),i.src=e.getIssuerOrigin()+"/auth/services/devicefingerprint",document.body.appendChild(i),n=setTimeout((function(){s(new r.AuthSdkError("Fingerprinting timed out"))}),(null==t?void 0:t.timeout)||15e3)})).finally((function(){clearTimeout(n),(0,a.removeListener)(window,"message",u),document.body.contains(i)&&i.parentElement.removeChild(i)})):Promise.reject(new r.AuthSdkError("Fingerprinting is not supported on this device"));var n,i,u};var r=n(5705),o=n(9426),a=n(6496);e.exports=t.default},6862:function(e,t,n){"use strict";var r=n(5318);t.assertValidConfig=function(e){var t=(e=e||{}).scopes;if(t&&!Array.isArray(t))throw new o.default('scopes must be a array of strings. Required usage: new OktaAuth({scopes: ["openid", "email"]})');var n=e.issuer;if(!n)throw new o.default('No issuer passed to constructor. Required usage: new OktaAuth({issuer: "https://{yourOktaDomain}.com/oauth2/{authServerId}"})');if(!new RegExp("^http?s?://.+").test(n))throw new o.default('Issuer must be a valid URL. Required usage: new OktaAuth({issuer: "https://{yourOktaDomain}.com/oauth2/{authServerId}"})');if(-1!==n.indexOf("-admin."))throw new o.default('Issuer URL passed to constructor contains "-admin" in subdomain. Required usage: new OktaAuth({issuer: "https://{yourOktaDomain}.com})')};var o=r(n(7948))},322:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(3913)),i=function(){function e(t){(0,o.default)(this,e),this.localOffset=parseInt(t||0)}return(0,a.default)(e,[{key:"now",value:function(){return(Date.now()+this.localOffset)/1e3}}],[{key:"create",value:function(){return new e(0)}}]),e}();t.default=i,e.exports=t.default},3754:function(e,t){"use strict";t.IDX_API_VERSION=t.DEFAULT_CODE_CHALLENGE_METHOD=t.MAX_VERIFIER_LENGTH=t.MIN_VERIFIER_LENGTH=t.REFERRER_PATH_STORAGE_KEY=t.REFRESH_TOKEN_STORAGE_KEY=t.ID_TOKEN_STORAGE_KEY=t.ACCESS_TOKEN_STORAGE_KEY=t.IDX_RESPONSE_STORAGE_NAME=t.ORIGINAL_URI_STORAGE_NAME=t.SHARED_TRANSACTION_STORAGE_NAME=t.TRANSACTION_STORAGE_NAME=t.PKCE_STORAGE_NAME=t.CACHE_STORAGE_NAME=t.TOKEN_STORAGE_NAME=t.REDIRECT_NONCE_COOKIE_NAME=t.REDIRECT_STATE_COOKIE_NAME=t.REDIRECT_OAUTH_PARAMS_NAME=t.DEFAULT_CACHE_DURATION=t.DEFAULT_MAX_CLOCK_SKEW=t.DEFAULT_POLLING_DELAY=t.STATE_TOKEN_KEY_NAME=void 0,t.STATE_TOKEN_KEY_NAME="oktaStateToken",t.DEFAULT_POLLING_DELAY=500,t.DEFAULT_MAX_CLOCK_SKEW=300,t.DEFAULT_CACHE_DURATION=86400,t.REDIRECT_OAUTH_PARAMS_NAME="okta-oauth-redirect-params",t.REDIRECT_STATE_COOKIE_NAME="okta-oauth-state",t.REDIRECT_NONCE_COOKIE_NAME="okta-oauth-nonce",t.TOKEN_STORAGE_NAME="okta-token-storage",t.CACHE_STORAGE_NAME="okta-cache-storage",t.PKCE_STORAGE_NAME="okta-pkce-storage",t.TRANSACTION_STORAGE_NAME="okta-transaction-storage",t.SHARED_TRANSACTION_STORAGE_NAME="okta-shared-transaction-storage",t.ORIGINAL_URI_STORAGE_NAME="okta-original-uri-storage",t.IDX_RESPONSE_STORAGE_NAME="okta-idx-response-storage",t.ACCESS_TOKEN_STORAGE_KEY="accessToken",t.ID_TOKEN_STORAGE_KEY="idToken",t.REFRESH_TOKEN_STORAGE_KEY="refreshToken",t.REFERRER_PATH_STORAGE_KEY="referrerPath",t.MIN_VERIFIER_LENGTH=43,t.MAX_VERIFIER_LENGTH=128,t.DEFAULT_CODE_CHALLENGE_METHOD="S256",t.IDX_API_VERSION="1.0.0"},5358:function(e,t,n){"use strict";t.stringToBase64Url=function(e){return a((0,o.btoa)(e))},t.base64ToBase64Url=a,t.base64UrlToBase64=i,t.base64UrlToString=function(e){var t=i(e);switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new r.AuthSdkError("Not a valid Base64Url")}var n=(0,o.atob)(t);try{return decodeURIComponent(escape(n))}catch(e){return n}},t.stringToBuffer=function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t},t.base64UrlDecode=u,t.base64UrlToBuffer=function(e){return Uint8Array.from(u(e),(function(e){return e.charCodeAt(0)}))},t.bufferToBase64Url=function(e){return(0,o.btoa)(new Uint8Array(e).reduce((function(e,t){return e+String.fromCharCode(t)}),""))};var r=n(5705),o=n(5912);function a(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function i(e){return e.replace(/-/g,"+").replace(/_/g,"/")}function u(e){return(0,o.atob)(i(e))}},6661:function(e,t){"use strict";t.webcrypto=t.btoa=t.atob=void 0,t.atob=function(e){return atob(e)},t.btoa=function(e){return btoa(e)};var n="undefined"==typeof crypto?null:crypto;t.webcrypto=n},5637:function(e,t,n){"use strict";var r=n(5358);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(5798);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(1138);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(5912);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}))},5798:function(e,t,n){"use strict";t.getOidcHash=function(e){var t=(new TextEncoder).encode(e);return o.webcrypto.subtle.digest("SHA-256",t).then((function(e){var t=new Uint8Array(e).slice(0,16),n=String.fromCharCode.apply(null,t);return(0,r.stringToBase64Url)(n)}))};var r=n(5358),o=n(5912)},1138:function(e,t,n){"use strict";t.verifyToken=function(e,t){t=(0,r.clone)(t);var n={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};return delete t.use,a.webcrypto.subtle.importKey("jwk",t,n,!0,["verify"]).then((function(t){var r=e.split("."),i=(0,o.stringToBuffer)(r[0]+"."+r[1]),u=(0,o.base64UrlDecode)(r[2]),s=(0,o.stringToBuffer)(u);return a.webcrypto.subtle.verify(n,t,s,i)}))};var r=n(8965),o=n(5358),a=n(5912)},2814:function(e,t,n){"use strict";t.getAssertion=t.getAttestation=t.buildCredentialRequestOptions=t.buildCredentialCreationOptions=void 0;var r=n(5358),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];return e.forEach((function(e){"webauthn"===e.key&&t.push({type:"public-key",id:(0,r.base64UrlToBuffer)(e.credentialId)})})),t};t.buildCredentialCreationOptions=function(e,t){return{publicKey:{rp:e.rp,user:{id:(0,r.base64UrlToBuffer)(e.user.id),name:e.user.name,displayName:e.user.displayName},challenge:(0,r.base64UrlToBuffer)(e.challenge),pubKeyCredParams:e.pubKeyCredParams,attestation:e.attestation,authenticatorSelection:e.authenticatorSelection,excludeCredentials:o(t)}}},t.buildCredentialRequestOptions=function(e,t){return{publicKey:{challenge:(0,r.base64UrlToBuffer)(e.challenge),userVerification:e.userVerification,allowCredentials:o(t)}}},t.getAttestation=function(e){var t=e.response;return{id:e.id,clientData:(0,r.bufferToBase64Url)(t.clientDataJSON),attestation:(0,r.bufferToBase64Url)(t.attestationObject)}},t.getAssertion=function(e){var t=e.response;return{id:e.id,clientData:(0,r.bufferToBase64Url)(t.clientDataJSON),authenticatorData:(0,r.bufferToBase64Url)(t.authenticatorData),signatureData:(0,r.bufferToBase64Url)(t.signature)}}},5912:function(e,t,n){"use strict";var r=n(6661);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}))},1226:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(2205)),i=r(n(8585)),u=r(n(9754));var s=function(e){(0,a.default)(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.default)(this,e)});function s(e,t){var n;(0,o.default)(this,s);var a=e.errorSummary;return(n=r.call(this,a)).name="AuthApiError",n.errorSummary=e.errorSummary,n.errorCode=e.errorCode,n.errorLink=e.errorLink,n.errorId=e.errorId,n.errorCauses=e.errorCauses,t&&(n.xhr=t),n}return s}(r(n(5020)).default);t.default=s,e.exports=t.default},3820:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(2205)),i=r(n(8585)),u=r(n(9754));var s=function(e){(0,a.default)(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.default)(this,e)});function s(){return(0,o.default)(this,s),r.call(this,"The poll was stopped by the sdk")}return s}(r(n(5020)).default);t.default=s,e.exports=t.default},7948:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(2205)),i=r(n(8585)),u=r(n(9754));var s=function(e){(0,a.default)(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.default)(this,e)});function s(e,t){var n;return(0,o.default)(this,s),(n=r.call(this,e)).name="AuthSdkError",n.errorCode="INTERNAL",n.errorSummary=e,n.errorLink="INTERNAL",n.errorId="INTERNAL",n.errorCauses=[],t&&(n.xhr=t),n}return s}(r(n(5020)).default);t.default=s,e.exports=t.default},5020:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(1506)),i=r(n(2205)),u=r(n(8585)),s=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function c(e){var t;return(0,o.default)(this,c),t=r.call(this,e),Object.setPrototypeOf((0,a.default)(t),(this instanceof c?this.constructor:void 0).prototype),t}return c}((0,r(n(5957)).default)(Error));t.default=c,e.exports=t.default},8101:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(4575)),a=r(n(2205)),i=r(n(8585)),u=r(n(9754));var s=function(e){(0,a.default)(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.default)(this,e)});function s(e,t){var n;return(0,o.default)(this,s),(n=r.call(this,t)).name="OAuthError",n.errorCode=e,n.errorSummary=t,n}return s}(r(n(5020)).default);t.default=s,e.exports=t.default},5705:function(e,t,n){"use strict";var r=n(5318);t.isAuthApiError=function(e){return e instanceof o.default},Object.defineProperty(t,"AuthApiError",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"AuthPollStopError",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"AuthSdkError",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"OAuthError",{enumerable:!0,get:function(){return u.default}});var o=r(n(1226)),a=r(n(3820)),i=r(n(7948)),u=r(n(8101))},9426:function(e,t,n){"use strict";t.isBrowser=a,t.isIE11OrLess=function(){if(!a())return!1;var e=document.documentMode;return!!e&&e<=11},t.getUserAgent=i,t.isFingerprintSupported=function(){var e=i();return e&&!o.test(e)},t.isPopupPostMessageSupported=function(){if(!a())return!1;var e=document.documentMode,t=e&&e<10;return void 0!==window.postMessage&&!t},t.isTokenVerifySupported=u,t.hasTextEncoder=s,t.isPKCESupported=function(){return u()&&s()},t.isHTTPS=function(){return!!a()&&"https:"===window.location.protocol},t.isLocalhost=function(){return a()&&"localhost"===window.location.hostname};var r=n(5637),o=/windows phone|iemobile|wpdesktop/i;function a(){return"undefined"!=typeof document&&"undefined"!=typeof window}function i(){return navigator.userAgent}function u(){return void 0!==r.webcrypto&&null!==r.webcrypto&&void 0!==r.webcrypto.subtle&&"undefined"!=typeof Uint8Array}function s(){return"undefined"!=typeof TextEncoder}},4888:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(8)),a=r(n(4098));function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.default=function(e,t,r){var u=r.data,s=r.headers||{};"application/json"===(s["Content-Type"]||s["content-type"]||"")&&u&&"string"!=typeof u&&(u=JSON.stringify(u));var c=(n.g.fetch||a.default)(t,{method:e,headers:r.headers,body:u,credentials:r.withCredentials?"include":"omit"});return c.finally||(c=Promise.resolve(c)),c.then((function(e){var t=!e.ok,n=e.status;return function(e){return e.headers.get("Content-Type")&&e.headers.get("Content-Type").toLowerCase().indexOf("application/json")>=0?e.json().catch((function(e){return{error:e,errorSummary:"Could not parse server response"}})):e.text()}(e).then((function(t){return function(e,t,n){var r,a="object"===(0,o.default)(t),u={},s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){s=!0,a=e},f:function(){try{u||null==n.return||n.return()}finally{if(s)throw a}}}}(n.headers.entries());try{for(s.s();!(r=s.n()).done;){var c=r.value;u[c[0]]=c[1]}}catch(e){s.e(e)}finally{s.f()}var l={responseText:a?JSON.stringify(t):t,status:e,headers:u};return a&&(l.responseType="json",l.responseJSON=t),l}(n,t,e)})).then((function(e){var n;if(t||(null===(n=e.responseJSON)||void 0===n?void 0:n.error))throw e;return e}))}))},e.exports=t.default},9033:function(e,t){"use strict";t.setRequestHeader=function(e,t,n){e.options.headers=e.options.headers||{},e.options.headers[t]=n}},2924:function(e,t,n){"use strict";var r=n(9033);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(4011);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},4011:function(e,t,n){"use strict";var r=n(5318);t.httpRequest=s,t.get=function(e,t,n){var r={url:t=(0,a.isAbsoluteUrl)(t)?t:e.getIssuerOrigin()+t,method:"GET"};return Object.assign(r,n),s(e,r)},t.post=function(e,t,n,r){var o={url:t=(0,a.isAbsoluteUrl)(t)?t:e.getIssuerOrigin()+t,method:"POST",args:n,saveAuthnState:!0};return Object.assign(o,r),s(e,o)};var o=r(n(8)),a=n(8965),i=r(n(1226)),u=n(3754);function s(e,t){var n=(t=t||{}).url,r=t.method,s=t.args,c=t.saveAuthnState,l=t.accessToken,f=!0===t.withCredentials,d=e.options.storageUtil.storage,h=e.storageManager.getHttpCache(e.options.cookies);if(t.cacheResponse){var p=h.getStorage()[n];if(p&&Date.now()/1e3<p.expiresAt)return Promise.resolve(p.response)}var v=e._oktaUserAgent.getHttpHeader(),g=Object.assign({Accept:"application/json","Content-Type":"application/json"},v);Object.assign(g,e.options.headers,t.headers),g=(0,a.removeNils)(g),l&&(0,a.isString)(l)&&(g.Authorization="Bearer "+l);var y,m,b={headers:g,data:s||void 0,withCredentials:f};return e.options.httpRequestClient(r,n,b).then((function(r){return(m=r.responseText)&&(0,a.isString)(m)&&(m=JSON.parse(m))&&"object"===(0,o.default)(m)&&!m.headers&&(m.headers=r.headers),c&&(m.stateToken||d.delete(u.STATE_TOKEN_KEY_NAME)),m&&m.stateToken&&m.expiresAt&&d.set(u.STATE_TOKEN_KEY_NAME,m.stateToken,m.expiresAt,e.options.cookies),m&&t.cacheResponse&&h.updateStorage(n,{expiresAt:Math.floor(Date.now()/1e3)+u.DEFAULT_CACHE_DURATION,response:m}),m})).catch((function(t){var n=t.responseText||{};if((0,a.isString)(n))try{n=JSON.parse(n)}catch(e){n={errorSummary:"Unknown error"}}throw t.status>=500&&(n.errorSummary="Unknown error"),e.options.transformErrorXHR&&(t=e.options.transformErrorXHR((0,a.clone)(t))),"E0000011"===(y=new i.default(n,t)).errorCode&&d.delete(u.STATE_TOKEN_KEY_NAME),y}))}},786:function(e,t,n){"use strict";var r=n(5318);t.authenticate=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(this,void 0,void 0,o.default.mark((function n(){return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.password&&!t.authenticator&&(t.authenticator=a.AuthenticatorKey.OKTA_PASSWORD),n.abrupt("return",(0,i.run)(e,Object.assign(Object.assign({},t),{flow:"authenticate"})));case 2:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(858),i=n(8710),u=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))}},373:function(e,t,n){"use strict";var r=n(5318);t.Authenticator=void 0;var o=r(n(4575));t.Authenticator=function e(t){(0,o.default)(this,e),this.meta=t}},6179:function(e,t,n){"use strict";var r=n(5318);t.OktaPassword=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),u=r(n(8585)),s=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canVerify",value:function(e){return!(!e.credentials&&!e.password)}},{key:"mapCredentials",value:function(e){var t=e.credentials,n=e.password;if(t||n)return t||{passcode:n}}},{key:"getInputs",value:function(e){var t;return Object.assign(Object.assign({},null===(t=e.form)||void 0===t?void 0:t.value[0]),{name:"password",type:"string",required:e.required})}}]),c}(n(373).Authenticator);t.OktaPassword=c},6741:function(e,t,n){"use strict";var r=n(5318);t.OktaVerifyTotp=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),u=r(n(8585)),s=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"mapCredentials",value:function(e){var t=e.verificationCode;if(t)return{totp:t}}}]),c}(n(8211).VerificationCodeAuthenticator);t.OktaVerifyTotp=c},3494:function(e,t,n){"use strict";var r=n(5318);t.SecurityQuestionEnrollment=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),u=r(n(8585)),s=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canVerify",value:function(e){var t=e.credentials;if(t&&t.questionKey&&t.answer)return!0;var n=e.questionKey,r=e.question,o=e.answer;return!(!n||!o)||!(!r||!o)}},{key:"mapCredentials",value:function(e){var t=e.questionKey,n=e.question,r=e.answer;if(t||n||r)return{questionKey:n?"custom":t,question:n,answer:r}}},{key:"getInputs",value:function(){return[{name:"questionKey",type:"string",required:!0},{name:"question",type:"string",label:"Create a security question"},{name:"answer",type:"string",label:"Answer",required:!0}]}}]),c}(n(373).Authenticator);t.SecurityQuestionEnrollment=c},3804:function(e,t,n){"use strict";var r=n(5318);t.SecurityQuestionVerification=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),u=r(n(8585)),s=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canVerify",value:function(e){return!!e.answer}},{key:"mapCredentials",value:function(e){var t=e.answer;if(t)return{questionKey:this.meta.contextualData.enrolledQuestion.questionKey,answer:t}}},{key:"getInputs",value:function(){return[{name:"answer",type:"string",label:"Answer",required:!0}]}}]),c}(n(373).Authenticator);t.SecurityQuestionVerification=c},8211:function(e,t,n){"use strict";var r=n(5318);t.VerificationCodeAuthenticator=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),u=r(n(8585)),s=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canVerify",value:function(e){return!!(e.credentials||e.verificationCode||e.otp)}},{key:"mapCredentials",value:function(e){var t=e.credentials,n=e.verificationCode,r=e.otp;if(t||n||r)return t||{passcode:n||r}}},{key:"getInputs",value:function(e){var t;return Object.assign(Object.assign({},null===(t=e.form)||void 0===t?void 0:t.value[0]),{name:"verificationCode",type:"string",required:e.required})}}]),c}(n(373).Authenticator);t.VerificationCodeAuthenticator=c},6663:function(e,t,n){"use strict";var r=n(5318);t.WebauthnEnrollment=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),u=r(n(8585)),s=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canVerify",value:function(e){var t=e.clientData,n=e.attestation;return!(!t||!n)}},{key:"mapCredentials",value:function(e){var t=e.clientData,n=e.attestation;if(t||n)return{clientData:t,attestation:n}}},{key:"getInputs",value:function(){return[{name:"clientData",type:"string",required:!0,visible:!1,label:"Client Data"},{name:"attestation",type:"string",required:!0,visible:!1,label:"Attestation"}]}}]),c}(n(373).Authenticator);t.WebauthnEnrollment=c},563:function(e,t,n){"use strict";var r=n(5318);t.WebauthnVerification=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),u=r(n(8585)),s=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canVerify",value:function(e){var t=e.clientData,n=e.authenticatorData,r=e.signatureData;return!!(t&&n&&r)}},{key:"mapCredentials",value:function(e){var t=e.authenticatorData,n=e.clientData,r=e.signatureData;if(t||n||r)return{authenticatorData:t,clientData:n,signatureData:r}}},{key:"getInputs",value:function(){return[{name:"authenticatorData",type:"string",label:"Authenticator Data",required:!0,visible:!1},{name:"clientData",type:"string",label:"Client Data",required:!0,visible:!1},{name:"signatureData",type:"string",label:"Signature Data",required:!0,visible:!1}]}}]),c}(n(373).Authenticator);t.WebauthnVerification=c},8523:function(e,t,n){"use strict";t.getAuthenticator=function(e){var t,n,f=e.relatesTo,d=(null==f?void 0:f.value)||{};switch(d.key){case l.AuthenticatorKey.OKTA_PASSWORD:return new a.OktaPassword(d);case l.AuthenticatorKey.SECURITY_QUESTION:return(null===(t=d.contextualData)||void 0===t?void 0:t.enrolledQuestion)?new u.SecurityQuestionVerification(d):new i.SecurityQuestionEnrollment(d);case l.AuthenticatorKey.OKTA_VERIFY:return new r.OktaVerifyTotp(d);case l.AuthenticatorKey.WEBAUTHN:return(null===(n=d.contextualData)||void 0===n?void 0:n.challengeData)?new c.WebauthnVerification(d):new s.WebauthnEnrollment(d);default:return new o.VerificationCodeAuthenticator(d)}};var r=n(6741),o=n(8211),a=n(6179),i=n(3494),u=n(3804),s=n(6663),c=n(563),l=n(6473)},2756:function(e,t,n){"use strict";var r=n(8523);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(373);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(8211);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(6179);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var u=n(3494);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var s=n(3804);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var c=n(6663);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=n(563);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}))},1825:function(e,t,n){"use strict";t.formatAuthenticator=function(e){var t;if((0,r.isAuthenticator)(e))t=e;else{if("string"!=typeof e)throw new Error("Invalid format for authenticator");t={key:e}}return t},t.compareAuthenticators=function(e,t){return!(!e||!t)&&(e.id&&t.id?e.id===t.id:!(!e.key||!t.key)&&e.key===t.key)},t.findMatchedOption=function(e,t){var n,r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){s=!0,i=e},f:function(){try{u||null==n.return||n.return()}finally{if(s)throw i}}}}(e);try{var i=function(){var e=r.value;if(n=t.find((function(t){return t.relatesTo.key===e.key})))return"break"};for(a.s();!(r=a.n()).done&&"break"!==i(););}catch(e){a.e(e)}finally{a.f()}return n};var r=n(6473);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},1208:function(e,t,n){"use strict";var r=n(5318);t.cancel=function(e,t){return u(this,void 0,void 0,o.default.mark((function n(){var r,u;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.transactionManager.load(),u=(0,i.getFlowSpecification)(e,r.flow),n.abrupt("return",(0,a.run)(e,Object.assign(Object.assign(Object.assign({},t),u),{actions:["cancel"]})));case 3:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(8710),i=n(4270),u=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))}},7169:function(e,t,n){"use strict";var r=n(5318);t.isEmailVerifyCallbackError=function(e){return"EmailVerifyCallbackError"===e.name},t.isEmailVerifyCallback=h,t.parseEmailVerifyCallback=p,t.handleEmailVerifyCallback=function(e,t){return f(this,void 0,void 0,o.default.mark((function n(){var r,a,i;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!h(t)){n.next=9;break}if(r=p(t),a=r.state,i=r.otp,!e.idx.canProceed({state:a})){n.next=8;break}return n.next=5,e.idx.proceed({state:a,otp:i});case 5:return n.abrupt("return",n.sent);case 8:throw new d(a,i);case 9:case"end":return n.stop()}}),n)})))},t.EmailVerifyCallbackError=void 0;var o=r(n(7757)),a=r(n(4575)),i=r(n(2205)),u=r(n(8585)),s=r(n(9754)),c=r(n(5020)),l=n(7724);var f=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))},d=function(e){(0,i.default)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function o(e,t){var n;return(0,a.default)(this,o),(n=r.call(this,"Enter the OTP code in the originating client: ".concat(t))).name="EmailVerifyCallbackError",n.state=e,n.otp=t,n}return o}(c.default);function h(e){return/(otp=)/i.test(e)&&/(state=)/i.test(e)}function p(e){return(0,l.urlParamsToObject)(e)}t.EmailVerifyCallbackError=d},7713:function(e,t,n){"use strict";t.AccountUnlockFlow=void 0;var r=n(6749),o={identify:r.Identify,"select-authenticator-unlock-account":r.SelectAuthenticatorUnlockAccount,"select-authenticator-authenticate":r.SelectAuthenticatorAuthenticate,"challenge-authenticator":r.ChallengeAuthenticator,"challenge-poll":r.ChallengePoll,"authenticator-verification-data":r.AuthenticatorVerificationData};t.AccountUnlockFlow=o},8962:function(e,t,n){"use strict";t.AuthenticationFlow=void 0;var r=n(6749),o={identify:r.Identify,"select-authenticator-authenticate":r.SelectAuthenticatorAuthenticate,"select-authenticator-enroll":r.SelectAuthenticatorEnroll,"authenticator-enrollment-data":r.AuthenticatorEnrollmentData,"authenticator-verification-data":r.AuthenticatorVerificationData,"enroll-authenticator":r.EnrollAuthenticator,"challenge-authenticator":r.ChallengeAuthenticator,"challenge-poll":r.ChallengePoll,"reenroll-authenticator":r.ReEnrollAuthenticator,"enroll-poll":r.EnrollPoll,"redirect-idp":r.RedirectIdp,skip:r.Skip};t.AuthenticationFlow=o},9438:function(e,t,n){"use strict";t.getFlowSpecification=function(e){var t,n,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",s=!0;switch(u){case"register":case"signup":case"enrollProfile":t=a.RegistrationFlow,s=!1;break;case"recoverPassword":case"resetPassword":t=o.PasswordRecoveryFlow,n=["currentAuthenticator-recover","currentAuthenticatorEnrollment-recover"],s=!1;break;case"unlockAccount":t=i.AccountUnlockFlow,s=!1,n=["unlock-account"];break;default:t=r.AuthenticationFlow}return{flow:u,remediators:t,actions:n,withCredentials:s}};var r=n(8962),o=n(5391),a=n(5333),i=n(7713)},5391:function(e,t,n){"use strict";t.PasswordRecoveryFlow=void 0;var r=n(6749),o={identify:r.Identify,"identify-recovery":r.Identify,"select-authenticator-authenticate":r.SelectAuthenticatorAuthenticate,"select-authenticator-enroll":r.SelectAuthenticatorEnroll,"challenge-authenticator":r.ChallengeAuthenticator,"authenticator-verification-data":r.AuthenticatorVerificationData,"authenticator-enrollment-data":r.AuthenticatorEnrollmentData,"reset-authenticator":r.ResetAuthenticator,"reenroll-authenticator":r.ReEnrollAuthenticator,"enroll-poll":r.EnrollPoll};t.PasswordRecoveryFlow=o},5333:function(e,t,n){"use strict";t.RegistrationFlow=void 0;var r=n(6749),o={"select-enroll-profile":r.SelectEnrollProfile,"enroll-profile":r.EnrollProfile,"authenticator-enrollment-data":r.AuthenticatorEnrollmentData,"select-authenticator-enroll":r.SelectAuthenticatorEnroll,"enroll-poll":r.EnrollPoll,"select-enrollment-channel":r.SelectEnrollmentChannel,"enrollment-channel-data":r.EnrollmentChannelData,"enroll-authenticator":r.EnrollAuthenticator,skip:r.Skip};t.RegistrationFlow=o},7646:function(){},4270:function(e,t,n){"use strict";var r=n(8962);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(9438);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(5391);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(5333);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var u=n(7713);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var s=n(7646);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}))},5294:function(e,t,n){"use strict";var r=n(5318);t.handleInteractionCodeRedirect=function(e,t){return i(this,void 0,void 0,o.default.mark((function n(){var r,i,u,s,c,l,f,d,h,p;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=e.transactionManager.load()){n.next=3;break}throw new a.AuthSdkError("No transaction data was found in storage");case 3:if(i=r.codeVerifier,u=r.state,s=new URL(t),c=s.searchParams,l=c.get("state"),f=c.get("interaction_code"),!(d=c.get("error"))){n.next=10;break}throw new a.OAuthError(d,c.get("error_description"));case 10:if(l===u){n.next=12;break}throw new a.AuthSdkError("State in redirect uri does not match with transaction state");case 12:if(f){n.next=14;break}throw new a.AuthSdkError("Unable to parse interaction_code from the url");case 14:return n.next=16,e.token.exchangeCodeForTokens({interactionCode:f,codeVerifier:i});case 16:h=n.sent,p=h.tokens,e.tokenManager.setTokens(p);case 19:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(5705),i=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))}},463:function(e,t,n){"use strict";var r=n(5318);t.setGlobalRequestInterceptor=function(e){o.default.client.interceptors.request.use(e)},t.clearGlobalRequestInterceptor=function(){o.default.client.interceptors.request.clear()},t.createGlobalRequestInterceptor=function(e){return function(t){var n=e._oktaUserAgent.getHttpHeader(),r=Object.assign(Object.assign({},n),e.options.headers);Object.keys(r).forEach((function(n){(e.options.clientSecret||"X-Device-Token"!==n)&&(t.headers[n]=r[n])}))}};var o=r(n(9812))},5969:function(e,t,n){"use strict";var r=n(5318);t.request=t.HttpClient=t.Interceptor=void 0;var o=r(n(7757)),a=r(n(4575)),i=r(n(3913)),u=r(n(4098)),s=function(){function e(){(0,a.default)(this,e),this.handlers=[]}return(0,i.default)(e,[{key:"use",value:function(e){this.handlers.push({before:e})}},{key:"clear",value:function(){this.handlers=[]}}]),e}();t.Interceptor=s;var c={interceptors:{request:new s}};t.HttpClient=c,t.request=function(e,t){var n,r,a,i,s=t.method,l=void 0===s?"POST":s,f=t.headers,d=void 0===f?{}:f,h=t.credentials,p=void 0===h?"include":h,v=t.body;return n=void 0,r=void 0,a=void 0,i=o.default.mark((function t(){var n,r;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={url:e,method:l,headers:Object.assign({},d),credentials:p,body:v},c.interceptors&&c.interceptors.request.handlers.forEach((function(e){e.before(n)})),r=n.url,delete n.url,t.abrupt("return",(0,u.default)(r,n));case 5:case"end":return t.stop()}}),t)})),new(a||(a=Promise))((function(e,t){function o(e){try{s(i.next(e))}catch(e){t(e)}}function u(e){try{s(i.throw(e))}catch(e){t(e)}}function s(t){var n;t.done?e(t.value):(n=t.value,n instanceof a?n:new a((function(e){e(n)}))).then(o,u)}s((i=i.apply(n,r||[])).next())}))}},9812:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(7014)),a=r(n(9028)),i=r(n(6653)),u=n(5969),s="1.0.0",c=(0,i.default)(s).makeIdxState,l={introspect:o.default,interact:a.default,makeIdxState:c,client:u.HttpClient,LATEST_SUPPORTED_IDX_API_VERSION:s};t.default=l,e.exports=t.default},9028:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(7757)),a=r(n(3038)),i=n(5969),u=function(e){return e.json().then((function(e){return Promise.reject(e)}))};t.default=function(e){var t,n,r,s,c=e.withCredentials,l=e.clientId,f=e.baseUrl,d=e.scopes,h=void 0===d?["openid","email"]:d,p=e.redirectUri,v=e.codeChallenge,g=e.codeChallengeMethod,y=e.state,m=e.activationToken,b=e.recoveryToken,k=e.clientSecret;return t=this,n=void 0,r=void 0,s=o.default.mark((function e(){var t,n,r,s,d;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat(f,"/v1/interact"),n={client_id:l,scope:h.join(" "),redirect_uri:p,code_challenge:v,code_challenge_method:g,state:y},m&&(n.activation_token=m),b&&(n.recovery_token=b),k&&(n.client_secret=k),r=Object.entries(n).map((function(e){var t=(0,a.default)(e,2),n=t[0],r=t[1];return"".concat(n,"=").concat(encodeURIComponent(r))})).join("&"),s={"content-type":"application/x-www-form-urlencoded"},d=!1===c?"omit":"include",e.abrupt("return",(0,i.request)(t,{credentials:d,headers:s,body:r}).then((function(e){return e.ok?e.json():u(e)})).then((function(e){return e.interaction_handle})));case 9:case"end":return e.stop()}}),e)})),new(r||(r=Promise))((function(e,o){function a(e){try{u(s.next(e))}catch(e){o(e)}}function i(e){try{u(s.throw(e))}catch(e){o(e)}}function u(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,i)}u((s=s.apply(t,n||[])).next())}))},e.exports=t.default},7014:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(7757)),a=n(5969),i=n(6605);t.default=function(e){var t,n,r,u,s=e.withCredentials,c=e.domain,l=e.interactionHandle,f=e.stateHandle,d=e.version;return t=this,n=void 0,r=void 0,u=o.default.mark((function e(){var t,n,r,u,h,p,v;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,i.validateVersionConfig)(d),t="".concat(c,"/idp/idx/introspect"),n=f?{stateToken:f}:{interactionHandle:l},r={"content-type":"application/ion+json; okta-version=".concat(d),accept:"application/ion+json; okta-version=".concat(d)},u=!1===s?"omit":"include",e.next=7,(0,a.request)(t,{credentials:u,headers:r,body:JSON.stringify(n)});case 7:return h=e.sent,p=h.ok,e.next=11,h.json();case 11:if(v=e.sent,p){e.next=14;break}throw v;case 14:return e.abrupt("return",v);case 15:case"end":return e.stop()}}),e)})),new(r||(r=Promise))((function(e,o){function a(e){try{s(u.next(e))}catch(e){o(e)}}function i(e){try{s(u.throw(e))}catch(e){o(e)}}function s(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,i)}s((u=u.apply(t,n||[])).next())}))},e.exports=t.default},6653:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(8223));t.default=function(e){switch(e){case"1.0.0":return o.default;case void 0:case null:throw new Error("Api version is required");default:throw new Error("Unknown api version: ".concat(e,". Use an exact semver version."))}},e.exports=t.default},6605:function(e,t,n){"use strict";var r=n(5318);t.validateVersionConfig=function(e){if(!e)throw new Error("version is required");if((null!=e?e:"").replace(/[^0-9a-zA-Z._-]/,"")!==e||!e)throw new Error("invalid version supplied - version is required and uses semver syntax");(0,o.default)(e)};var o=r(n(6653))},4902:function(e,t){"use strict";function n(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,a=function(){};return{s:a,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){s=!0,i=e},f:function(){try{u||null==n.return||n.return()}finally{if(s)throw i}}}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.divideActionParamsByMutability=void 0;var o=function(e){return!1!==e.mutable},a=function(e){var t,r,a={},i=[],u={};if(!e.value)return i.push(e),{defaultParamsForAction:a,neededParamsForAction:i,immutableParamsForAction:u};var s,c=n(e.value);try{for(c.s();!(s=c.n()).done;){var l=s.value;o(l)?(i.push(l),null!==(t=l.value)&&void 0!==t&&t&&(a[l.name]=l.value)):u[l.name]=null!==(r=l.value)&&void 0!==r?r:""}}catch(e){c.e(e)}finally{c.f()}return{defaultParamsForAction:a,neededParamsForAction:i,immutableParamsForAction:u}};t.divideActionParamsByMutability=function(e){var t,r=[],o={},i={},u=n(e=Array.isArray(e)?e:[e]);try{for(u.s();!(t=u.n()).done;){var s=t.value,c=a(s),l=c.defaultParamsForAction,f=c.neededParamsForAction,d=c.immutableParamsForAction;r.push(f),o[s.name]=l,i[s.name]=d}}catch(e){u.e(e)}finally{u.f()}return{defaultParams:o,neededParams:r,immutableParams:i}}},8705:function(e,t,n){"use strict";var r=n(5318);t.default=void 0;var o=r(n(7757)),a=n(5969),i=n(4902),u=n(628),s=function(e){var t=e.actionDefinition,n=e.defaultParamsForAction,r=void 0===n?{}:n,i=e.immutableParamsForAction,s=void 0===i?{}:i,c=e.toPersist,l=t.href;return function(e){return n=this,i=void 0,f=void 0,d=o.default.mark((function n(){var i,f,d,h,p,v,g;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i={"content-type":"application/json",accept:t.accepts||"application/ion+json"},f=JSON.stringify(Object.assign(Object.assign(Object.assign({},r),e),s)),d=c&&!1===c.withCredentials?"omit":"include",n.next=5,(0,a.request)(l,{method:t.method,headers:i,body:f,credentials:d});case 5:return h=n.sent,n.next=8,h.json();case 8:if(p=n.sent,v=h.ok,g=(0,u.makeIdxState)(p,c,v),401===h.status&&'Oktadevicejwt realm="Okta Device"'===h.headers.get("WWW-Authenticate")&&(g.stepUp=!0),v){n.next=14;break}throw g;case 14:return n.abrupt("return",g);case 15:case"end":return n.stop()}}),n)})),new(f||(f=Promise))((function(e,t){function r(e){try{a(d.next(e))}catch(e){t(e)}}function o(e){try{a(d.throw(e))}catch(e){t(e)}}function a(t){var n;t.done?e(t.value):(n=t.value,n instanceof f?n:new f((function(e){e(n)}))).then(r,o)}a((d=d.apply(n,i||[])).next())}));var n,i,f,d}};t.default=function(e,t){var n=s,r=(0,i.divideActionParamsByMutability)(e),o=r.defaultParams,a=r.neededParams,u=r.immutableParams,c=n({actionDefinition:e,defaultParamsForAction:o[e.name],immutableParamsForAction:u[e.name],toPersist:t});return c.neededParams=a,c},e.exports=t.default},1813:function(e,t,n){"use strict";var r=n(5318);t.parseIdxResponse=t.parseNonRemediations=void 0;var o=r(n(3038)),a=r(n(8)),i=n(9465),u=r(n(8705)),s=n(5883),c=function(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},l=Object.fromEntries(["remediation","context"].map((function(e){return[e,!0]}))),f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r={};return Object.keys(e).filter((function(e){return!l[e]})).forEach((function(i){if("object"===(0,a.default)(e[i])&&e[i])if(e[i].rel)n[e[i].name]=(0,u.default)(e[i],t);else{var s=e[i],l=s.value,f=s.type,d=c(s,["value","type"]);r[i]=Object.assign({type:f},d),"object"===f?(r[i].value={},Object.entries(l).forEach((function(e){var a=(0,o.default)(e,2),s=a[0],c=a[1];c.rel?n["".concat(i,"-").concat(s.name||s)]=(0,u.default)(c,t):r[i].value[s]=c}))):r[i].value=l}else r[i]=e[i]})),{context:r,actions:n}};t.parseNonRemediations=f;var d=function e(t,n){Object.keys(n).forEach((function(r){if("relatesTo"===r){var o=Array.isArray(n[r])?n[r][0]:n[r];if("string"==typeof o){var a=(0,s.JSONPath)({path:o,json:t})[0];if(a)return void(n[r]=a)}}Array.isArray(n[r])&&n[r].forEach((function(n){return e(t,n)}))}))},h=function(e,t){var n=(0,i.generateRemediationFunctions)([e],t)[e.name];return Object.assign(Object.assign({},e),{action:n})};t.parseIdxResponse=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(null===(t=e.remediation)||void 0===t?void 0:t.value)||[];r.forEach((function(t){return d(e,t)}));var o=r.map((function(e){return h(e,n)})),a=f(e,n),i=a.context,u=a.actions;return{remediations:o,context:i,actions:u}}},628:function(e,t,n){"use strict";var r=n(5318);t.makeIdxState=function(e,t,n){var r,s,c,l=e,f=(0,i.parseIdxResponse)(e,t),d=f.remediations,h=f.context,p=f.actions;return{proceed:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(this,void 0,void 0,o.default.mark((function n(){var r;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=d.find((function(t){return t.name===e}))){n.next=3;break}return n.abrupt("return",Promise.reject("Unknown remediation choice: [".concat(e,"]")));case 3:return n.abrupt("return",r.action(t));case 4:case"end":return n.stop()}}),n)})))},neededToProceed:(0,a.default)(d),actions:p,context:h,rawIdxState:l,interactionCode:null===(c=null===(s=null===(r=l.successWithInteractionCode)||void 0===r?void 0:r.value)||void 0===s?void 0:s.find((function(e){return"interaction_code"===e.name})))||void 0===c?void 0:c.value,toPersist:t,requestDidSucceed:n}};var o=r(n(7757)),a=r(n(319)),i=n(1813),u=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))}},8223:function(e,t,n){"use strict";t.default=void 0;var r={makeIdxState:n(628).makeIdxState};t.default=r,e.exports=t.default},9465:function(e,t,n){"use strict";var r=n(5318);t.generateRemediationFunctions=void 0;var o=r(n(8705));t.generateRemediationFunctions=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.fromEntries(e.map((function(e){return[e.name,(0,o.default)(e,t)]})))}},6141:function(e,t,n){"use strict";var r={authenticate:!0,cancel:!0,handleEmailVerifyCallback:!0,isEmailVerifyCallback:!0,parseEmailVerifyCallback:!0,isEmailVerifyCallbackError:!0,interact:!0,introspect:!0,poll:!0,proceed:!0,canProceed:!0,register:!0,recoverPassword:!0,handleInteractionCodeRedirect:!0,startTransaction:!0,unlockAccount:!0};Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return o.authenticate}}),Object.defineProperty(t,"cancel",{enumerable:!0,get:function(){return a.cancel}}),Object.defineProperty(t,"handleEmailVerifyCallback",{enumerable:!0,get:function(){return i.handleEmailVerifyCallback}}),Object.defineProperty(t,"isEmailVerifyCallback",{enumerable:!0,get:function(){return i.isEmailVerifyCallback}}),Object.defineProperty(t,"parseEmailVerifyCallback",{enumerable:!0,get:function(){return i.parseEmailVerifyCallback}}),Object.defineProperty(t,"isEmailVerifyCallbackError",{enumerable:!0,get:function(){return i.isEmailVerifyCallbackError}}),Object.defineProperty(t,"interact",{enumerable:!0,get:function(){return u.interact}}),Object.defineProperty(t,"introspect",{enumerable:!0,get:function(){return s.introspect}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return c.poll}}),Object.defineProperty(t,"proceed",{enumerable:!0,get:function(){return l.proceed}}),Object.defineProperty(t,"canProceed",{enumerable:!0,get:function(){return l.canProceed}}),Object.defineProperty(t,"register",{enumerable:!0,get:function(){return f.register}}),Object.defineProperty(t,"recoverPassword",{enumerable:!0,get:function(){return d.recoverPassword}}),Object.defineProperty(t,"handleInteractionCodeRedirect",{enumerable:!0,get:function(){return h.handleInteractionCodeRedirect}}),Object.defineProperty(t,"startTransaction",{enumerable:!0,get:function(){return p.startTransaction}}),Object.defineProperty(t,"unlockAccount",{enumerable:!0,get:function(){return v.unlockAccount}});var o=n(786),a=n(1208),i=n(7169),u=n(1440),s=n(1750),c=n(6789),l=n(8010),f=n(7479),d=n(6223),h=n(5294),p=n(3248),v=n(5752),g=n(4456);Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}))},1440:function(e,t,n){"use strict";var r=n(5318);t.interact=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(this,void 0,void 0,o.default.mark((function n(){var r,l,d,h,p,v,g,y,m,b,k,w,O,S,E;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=(0,c.removeNils)(t),!(null==(r=(0,i.getSavedTransactionMeta)(e,t))?void 0:r.interactionHandle)){n.next=4;break}return n.abrupt("return",f(r));case 4:return n.next=6,(0,s.createTransactionMeta)(e,Object.assign(Object.assign({},r),t));case 6:return r=n.sent,l=(0,u.getOAuthBaseUrl)(e),h=(d=r).clientId,p=d.redirectUri,v=d.state,g=d.scopes,y=d.withCredentials,m=d.codeChallenge,b=d.codeChallengeMethod,k=d.activationToken,w=d.recoveryToken,O=t.clientSecret||e.options.clientSecret,n.next=12,a.default.interact({withCredentials:y,clientId:h,baseUrl:l,scopes:g,state:v,redirectUri:p,codeChallenge:m,codeChallengeMethod:b,activationToken:k,recoveryToken:w,clientSecret:O});case 12:return S=n.sent,E=Object.assign(Object.assign({},r),{interactionHandle:S,withCredentials:y,state:v,scopes:g,recoveryToken:w,activationToken:k}),(0,i.saveTransactionMeta)(e,E),n.abrupt("return",f(E));case 16:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=r(n(9812)),i=n(4456),u=n(6496),s=n(6141),c=n(8965),l=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))};function f(e){return{meta:e,interactionHandle:e.interactionHandle,state:e.state}}},1750:function(e,t,n){"use strict";var r=n(5318);t.introspect=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c(this,void 0,void 0,o.default.mark((function n(){var r,c,l,f,d,h;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if((l=e.transactionManager.loadIdxResponse())&&(r=l.rawIdxResponse,c=l.requestDidSucceed),r){n.next=20;break}return f=t.version||s.IDX_API_VERSION,d=(0,u.getOAuthDomain)(e),n.prev=5,n.next=8,a.default.introspect(Object.assign(Object.assign({domain:d},t),{version:f}));case 8:r=n.sent,c=!0,n.next=20;break;case 12:if(n.prev=12,n.t0=n.catch(5),!(0,i.isRawIdxResponse)(n.t0)){n.next=19;break}r=n.t0,c=!1,n.next=20;break;case 19:throw n.t0;case 20:return h=t.withCredentials,n.abrupt("return",a.default.makeIdxState(r,{withCredentials:h},c));case 22:case"end":return n.stop()}}),n,null,[[5,12]])})))};var o=r(n(7757)),a=r(n(9812)),i=n(3675),u=n(6496),s=n(3754),c=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))}},6789:function(e,t,n){"use strict";var r=n(5318);t.poll=function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(this,void 0,void 0,o.default.mark((function c(){var l,f,d;return o.default.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,a.proceed)(t,{startPolling:!0});case 2:if(l=c.sent,f=(0,i.getSavedTransactionMeta)(t),(null==(d=null===(n=null==f?void 0:f.remediations)||void 0===n?void 0:n.find((function(e){return e.includes("poll")})))?void 0:d.length)||(0,u.warn)("No polling remediations available at the current IDX flow stage"),!Number.isInteger(r.refresh)){c.next=8;break}return c.abrupt("return",new Promise((function(n,a){setTimeout((function(){var r,i;return s(this,void 0,void 0,o.default.mark((function u(){var s;return o.default.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:try{s=null===(i=null===(r=l.nextStep)||void 0===r?void 0:r.poll)||void 0===i?void 0:i.refresh,n(s?e(t,{refresh:s}):l)}catch(e){a(e)}case 1:case"end":return o.stop()}}),u)})))}),r.refresh)})));case 8:return c.abrupt("return",l);case 9:case"end":return c.stop()}}),c)})))};var o=r(n(7757)),a=n(8010),i=n(4456),u=n(8965),s=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))}},8010:function(e,t,n){"use strict";var r=n(5318);t.canProceed=c,t.proceed=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(this,void 0,void 0,o.default.mark((function n(){var r,s,l;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(c(e,t)){n.next=2;break}throw new u.AuthSdkError("Unable to proceed: saved transaction could not be loaded");case 2:return r=t.flow,s=t.state,r||(l=(0,i.getSavedTransactionMeta)(e,{state:s}),r=null==l?void 0:l.flow),n.abrupt("return",(0,a.run)(e,Object.assign(Object.assign({},t),{flow:r})));case 5:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(8710),i=n(4456),u=n(5705),s=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))};function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,i.getSavedTransactionMeta)(e,t);return!(!n&&!t.stateHandle)}},6223:function(e,t,n){"use strict";var r=n(5318);t.recoverPassword=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(this,void 0,void 0,o.default.mark((function n(){var r;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=(0,i.getFlowSpecification)(e,"recoverPassword"),n.abrupt("return",(0,a.run)(e,Object.assign(Object.assign({},t),r)));case 2:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(8710),i=n(4270),u=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))}},7479:function(e,t,n){"use strict";var r=n(5318);t.register=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(this,void 0,void 0,o.default.mark((function n(){var r,l,f;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if((0,i.hasSavedInteractionHandle)(e)){n.next=12;break}return n.next=3,(0,u.startTransaction)(e,Object.assign(Object.assign({},t),{flow:"register",autoRemediate:!1}));case 3:if(r=n.sent,l=r.enabledFeatures,f=r.availableSteps,t.activationToken||!l||l.includes(c.IdxFeature.REGISTRATION)){n.next=9;break}throw new s.AuthSdkError("Registration is not supported based on your current org configuration.");case 9:if(!t.activationToken||!(null==f?void 0:f.some((function(e){return"identify"===e.name})))){n.next=12;break}throw new s.AuthSdkError("activationToken is not supported based on your current org configuration.");case 12:return n.abrupt("return",(0,a.run)(e,Object.assign(Object.assign({},t),{flow:"register"})));case 13:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(8710),i=n(4456),u=n(3248),s=n(5705),c=n(858),l=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))}},4122:function(e,t,n){"use strict";var r=n(5318);t.getRemediator=p,t.remediate=function e(t,n,r){return h(this,void 0,void 0,o.default.mark((function s(){var l,d,h,b,k,w,O,S,E,T,_,A,x,R,P,j,M,C;return o.default.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(d=(l=t).neededToProceed,h=l.interactionCode,b=r.flow,!h){s.next=4;break}return s.abrupt("return",{idxResponse:t});case 4:if(k=(0,c.isTerminalResponse)(t),w=(0,c.getMessagesFromResponse)(t),!k){s.next=8;break}return s.abrupt("return",{idxResponse:t,terminal:k,messages:w});case 8:if(O=p(d,n,r),S=y(n,t),E=r.actions||[],!(T=[].concat((0,i.default)(E),(0,i.default)(S&&[S]||[])))){s.next=32;break}_=f(T),s.prev=14,x=o.default.mark((function a(){var i,u,s;return o.default.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(i=A.value,u=m(n),s=Object.assign(Object.assign({},r),{actions:E.filter((function(e){return e!==i}))}),"function"!=typeof t.actions[i]){o.next=17;break}return o.prev=4,o.next=7,t.actions[i]();case 7:(t=o.sent).requestDidSucceed=!0,o.next=14;break;case 11:return o.prev=11,o.t0=o.catch(4),o.abrupt("return",{v:g(o.t0,O)});case 14:if("cancel"!==i){o.next=16;break}return o.abrupt("return",{v:{idxResponse:t,canceled:!0}});case 16:return o.abrupt("return",{v:e(t,u,s)});case 17:if(!d.find((function(e){return e.name===i}))){o.next=30;break}return o.prev=19,o.next=22,t.proceed(i,{});case 22:(t=o.sent).requestDidSucceed=!0,o.next=29;break;case 26:return o.prev=26,o.t1=o.catch(19),o.abrupt("return",{v:g(o.t1,O)});case 29:return o.abrupt("return",{v:e(t,n,s)});case 30:case"end":return o.stop()}}),a,null,[[4,11],[19,26]])})),_.s();case 17:if((A=_.n()).done){s.next=24;break}return s.delegateYield(x(),"t0",19);case 19:if(R=s.t0,"object"!==(0,a.default)(R)){s.next=22;break}return s.abrupt("return",R.v);case 22:s.next=17;break;case 24:s.next=29;break;case 26:s.prev=26,s.t1=s.catch(14),_.e(s.t1);case 29:return s.prev=29,_.f(),s.finish(29);case 32:if(O){s.next=49;break}if(!r.step){s.next=46;break}return n=(0,c.filterValuesForRemediation)(t,n),s.prev=35,s.next=38,t.proceed(r.step,n);case 38:return(t=s.sent).requestDidSucceed=!0,s.abrupt("return",{idxResponse:t});case 43:return s.prev=43,s.t2=s.catch(35),s.abrupt("return",g(s.t2));case 46:if("default"!==b){s.next=48;break}return s.abrupt("return",{idxResponse:t});case 48:throw new u.AuthSdkError("\n No remediation can match current flow, check policy settings in your org.\n Remediations: [".concat(d.reduce((function(e,t){return e?e+" ,"+t.name:t.name}),""),"]\n "));case 49:if(!w.length){s.next=52;break}return P=v(O,t),s.abrupt("return",{idxResponse:t,nextStep:P,messages:w});case 52:if(O.canRemediate()){s.next=55;break}return j=v(O,t),s.abrupt("return",{idxResponse:t,nextStep:j});case 55:return M=O.getName(),C=O.getData(),s.prev=57,s.next=60,t.proceed(M,C);case 60:return(t=s.sent).requestDidSucceed=!0,n=O.getValuesAfterProceed(),delete r.step,s.abrupt("return",e(t,n,r));case 67:return s.prev=67,s.t3=s.catch(57),s.abrupt("return",g(s.t3,O));case 70:case"end":return s.stop()}}),s,null,[[14,26,29,32],[35,43],[57,67]])})))};var o=r(n(7757)),a=r(n(8)),i=r(n(319)),u=n(5705),s=n(3675),c=n(9581),l=n(8965);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){u=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw a}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))};function p(e,t,n){var r,o=n.remediators;if(!n.step){var a,i=[],u=f(e);try{for(u.s();!(a=u.n()).done;){var s=a.value;if(Object.keys(o).includes(s.name)){if((r=new(0,o[s.name])(s,t,n)).canRemediate())return r;i.push(r)}}}catch(e){u.e(e)}finally{u.f()}return i[0]}var c=e.find((function(e){return e.name===n.step}));if(c){var d=c?o[c.name]:void 0;return d?new d(c,t,n):void 0}(0,l.warn)('step "'.concat(n.step,'" did not match any remediations'))}function v(e,t){var n=e.getNextStep(t.context),r=(0,c.canSkipFn)(t),o=(0,c.canResendFn)(t);return Object.assign(Object.assign(Object.assign({},n),r&&{canSkip:r}),o&&{canResend:o})}function g(e,t){var n=(0,s.isIdxResponse)(e)?e:null;if(!n)throw e;n.requestDidSucceed=!1;var r=(0,c.isTerminalResponse)(n),o=(0,c.getMessagesFromResponse)(n);if(r)return{idxResponse:n,terminal:r,messages:o};var a=t&&v(t,n);return Object.assign({idxResponse:n,messages:o},a&&{nextStep:a})}function y(e,t){return Object.keys(t.actions).find((function(t){return!!e.resend&&t.includes("-resend")}))}function m(e){return e.resend=void 0,e}},6874:function(e,t,n){"use strict";var r=n(5318);t.AuthenticatorEnrollmentData=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(6525)),u=r(n(2205)),s=r(n(8585)),c=r(n(9754)),l=n(8298),f=n(5323);var d=function(e){(0,u.default)(l,e);var t,n,r=(t=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.default)(t);if(n){var o=(0,c.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function l(){return(0,o.default)(this,l),r.apply(this,arguments)}return(0,a.default)(l,[{key:"mapAuthenticator",value:function(){var e=this.getAuthenticatorData();return{id:(0,f.getAuthenticatorFromRemediation)(this.remediation).form.value.find((function(e){return"id"===e.name})).value,methodType:e.methodType,phoneNumber:e.phoneNumber}}},{key:"getInputAuthenticator",value:function(){return[{name:"methodType",type:"string",required:!0},{name:"phoneNumber",type:"string",required:!0,label:"Phone Number"}]}},{key:"mapAuthenticatorDataFromValues",value:function(e){e=(0,i.default)((0,c.default)(l.prototype),"mapAuthenticatorDataFromValues",this).call(this,e);var t=this.values.phoneNumber;if(e||t)return Object.assign(Object.assign({},e&&e),t&&{phoneNumber:t})}}]),l}(l.AuthenticatorData);t.AuthenticatorEnrollmentData=d,d.remediationName="authenticator-enrollment-data"},8129:function(e,t,n){"use strict";var r=n(5318);t.AuthenticatorVerificationData=void 0;var o=r(n(9713)),a=r(n(319)),i=r(n(4575)),u=r(n(3913)),s=r(n(6525)),c=r(n(2205)),l=r(n(8585)),f=r(n(9754)),d=n(5705);var h=function(e){(0,c.default)(h,e);var t,n,r=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,f.default)(t);if(n){var o=(0,f.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.default)(this,e)});function h(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.default)(this,h),(t=r.call(this,e,n)).shouldProceedWithEmailAuthenticator=1===t.authenticator.methods.length&&"email"===t.authenticator.methods[0].type,t}return(0,u.default)(h,[{key:"canRemediate",value:function(){return!!this.shouldProceedWithEmailAuthenticator||(0,s.default)((0,f.default)(h.prototype),"canRemediate",this).call(this)}},{key:"mapAuthenticator",value:function(){var e;return this.shouldProceedWithEmailAuthenticator?null===(e=this.getAuthenticatorFromRemediation().form)||void 0===e?void 0:e.value.reduce((function(e,t){if(t.value)e[t.name]=t.value;else{if(!t.options)throw new d.AuthSdkError("Unsupported authenticator data type: ".concat(t));e[t.name]=t.options[0].value}return e}),{}):this.getAuthenticatorData()}},{key:"getInputAuthenticator",value:function(){var e=this.getAuthenticatorFromRemediation(),t=e.form.value.find((function(e){return"methodType"===e.name}));return t&&t.options?{name:"methodType",type:"string",required:!0}:(0,a.default)(e.form.value)}},{key:"getValuesAfterProceed",value:function(){var e=this;return this.values=(0,s.default)((0,f.default)(h.prototype),"getValuesAfterProceed",this).call(this),Object.keys(this.values).filter((function(e){return"authenticator"!==e})).reduce((function(t,n){return Object.assign(Object.assign({},t),(0,o.default)({},n,e.values[n]))}),{})}}]),h}(n(8298).AuthenticatorData);t.AuthenticatorVerificationData=h,h.remediationName="authenticator-verification-data"},8298:function(e,t,n){"use strict";var r=n(5318);t.AuthenticatorData=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(6525)),u=r(n(2205)),s=r(n(8585)),c=r(n(9754)),l=n(8674),f=n(6473),d=n(1825);var h=function(e){(0,u.default)(l,e);var t,n,r=(t=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.default)(t);if(n){var o=(0,c.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function l(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.default)(this,l),(t=r.call(this,e,n)).authenticator=t.getAuthenticator(),t.formatAuthenticatorData(),t}return(0,a.default)(l,[{key:"formatAuthenticatorData",value:function(){var e=this;if(this.getAuthenticatorData())this.values.authenticatorsData=this.values.authenticatorsData.map((function(t){return(0,d.compareAuthenticators)(e.authenticator,t)?e.mapAuthenticatorDataFromValues(t):t}));else{var t=this.mapAuthenticatorDataFromValues();t&&this.values.authenticatorsData.push(t)}}},{key:"getAuthenticatorData",value:function(){var e=this;return this.values.authenticatorsData.find((function(t){return(0,d.compareAuthenticators)(e.authenticator,t)}))}},{key:"canRemediate",value:function(){var e=this;return this.values.authenticatorsData.some((function(t){return(0,d.compareAuthenticators)(e.authenticator,t)}))}},{key:"getNextStep",value:function(){var e=(0,i.default)((0,c.default)(l.prototype),"getNextStep",this).call(this),t=this.getMethodTypes();return Object.assign(Object.assign({},e),t&&{options:t})}},{key:"mapAuthenticatorDataFromValues",value:function(e){var t=this.values,n=t.methodType,r=t.authenticator;!n&&(0,f.isAuthenticator)(r)&&(n=null==r?void 0:r.methodType);var o=this.authenticator,a=o.id,i=o.enrollmentId,u=Object.assign(Object.assign({id:a,enrollmentId:i},e&&e),n&&{methodType:n});return u.methodType?u:null}},{key:"getAuthenticatorFromRemediation",value:function(){return this.remediation.value.find((function(e){return"authenticator"===e.name}))}},{key:"getMethodTypes",value:function(){var e;return null===(e=this.getAuthenticatorFromRemediation().form.value.find((function(e){return"methodType"===e.name})))||void 0===e?void 0:e.options}},{key:"getValuesAfterProceed",value:function(){var e=this;this.values=(0,i.default)((0,c.default)(l.prototype),"getValuesAfterProceed",this).call(this);var t=this.values.authenticatorsData.filter((function(t){return!0!==(0,d.compareAuthenticators)(e.authenticator,t)}));return Object.assign(Object.assign({},this.values),{authenticatorsData:t})}}]),l}(l.Remediator);t.AuthenticatorData=h},8674:function(e,t,n){"use strict";var r=n(5318);t.Remediator=void 0;var o=r(n(319)),a=r(n(8)),i=r(n(4575)),u=r(n(3913)),s=n(5323),c=n(1825);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,i.default)(this,e),this.values=Object.assign({},n),this.options=Object.assign({},r),this.formatAuthenticators(),this.remediation=t}return(0,u.default)(e,[{key:"formatAuthenticators",value:function(){if(this.values.authenticators=this.values.authenticators||[],this.values.authenticators=this.values.authenticators.map((function(e){return(0,c.formatAuthenticator)(e)})),this.values.authenticator){var e=(0,c.formatAuthenticator)(this.values.authenticator);this.values.authenticators.some((function(t){return(0,c.compareAuthenticators)(e,t)}))||this.values.authenticators.push(e)}this.values.authenticatorsData=this.values.authenticators.reduce((function(e,t){return"object"===(0,a.default)(t)&&Object.keys(t).length>1&&e.push(t),e}),this.values.authenticatorsData||[])}},{key:"getName",value:function(){return this.remediation.name}},{key:"canRemediate",value:function(){var e=this;return!(0,s.getRequiredValues)(this.remediation).find((function(t){return!e.hasData(t)}))}},{key:"getData",value:function(e){var t=this;if(!e){var n=(0,s.getAllValues)(this.remediation).reduce((function(e,n){return e[n]=t.getData(n),e}),{});return n}if("function"==typeof this["map".concat((0,s.titleCase)(e))]){var r=this["map".concat((0,s.titleCase)(e))](this.remediation.value.find((function(t){return t.name===e})));if(r)return r}if(this.map&&this.map[e])for(var o=this.map[e],a=0;a<o.length;a++){var i=this.values[o[a]];if(i)return i}return this.values[e]}},{key:"hasData",value:function(e){return!!this.getData(e)}},{key:"getNextStep",value:function(e){var t=this.getName(),n=this.getInputs(),r=this.getAuthenticator(),o=null==r?void 0:r.type;return Object.assign(Object.assign({name:t,inputs:n},o&&{type:o}),r&&{authenticator:r})}},{key:"getInputs",value:function(){var e=this,t=[];return(this.remediation.value||[]).forEach((function(n){var r,o=n.name,a=n.type;if(!1!==n.visible){if("function"==typeof e["getInput".concat((0,s.titleCase)(o))])r=e["getInput".concat((0,s.titleCase)(o))](n);else if("object"!==a){var i,u=(e.map?e.map[o]:null)||[];i=1===u.length?u[0]:u.find((function(t){return Object.keys(e.values).includes(t)})),i&&(r=Object.assign(Object.assign({},n),{name:i}))}r||(r=n),Array.isArray(r)?r.forEach((function(e){return t.push(e)})):t.push(r)}})),t}},{key:"getValuesAfterProceed",value:function(){var e,t=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){u=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw a}}}}(this.getInputs());try{for(t.s();!(e=t.n()).done;){var n=e.value;delete this.values[n.name]}}catch(e){t.e(e)}finally{t.f()}return this.values}},{key:"getAuthenticator",value:function(){var e,t,n=null===(e=this.remediation.relatesTo)||void 0===e?void 0:e.value;if(n){var r=(0,s.getAuthenticatorFromRemediation)(this.remediation);if(!r)return n;var o=r.form.value.find((function(e){return"id"===e.name})).value,a=null===(t=r.form.value.find((function(e){return"enrollmentId"===e.name})))||void 0===t?void 0:t.value;return Object.assign(Object.assign({},n),{id:o,enrollmentId:a})}}}],[{key:"getMessages",value:function(e){var t,n;if(e.value)return null===(n=null===(t=e.value[0])||void 0===t?void 0:t.form)||void 0===n?void 0:n.value.reduce((function(e,t){return t.messages&&(e=[].concat((0,o.default)(e),(0,o.default)(t.messages.value))),e}),[])}}]),e}();t.Remediator=f},6255:function(e,t,n){"use strict";var r=n(5318);t.SelectAuthenticator=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(6525)),u=r(n(2205)),s=r(n(8585)),c=r(n(9754)),l=n(8674),f=n(5323),d=n(6473),h=n(1825);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v=function(e){(0,u.default)(l,e);var t,n,r=(t=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.default)(t);if(n){var o=(0,c.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function l(){return(0,o.default)(this,l),r.apply(this,arguments)}return(0,a.default)(l,[{key:"findMatchedOption",value:function(e,t){var n,r,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){u=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw a}}}}(e);try{var a=function(){var e=r.value;if(n=t.find((function(t){return t.relatesTo.key===e.key})))return"break"};for(o.s();!(r=o.n()).done&&"break"!==a(););}catch(e){o.e(e)}finally{o.f()}return n}},{key:"canRemediate",value:function(){var e=this.values,t=e.authenticators,n=e.authenticator,r=(0,f.getAuthenticatorFromRemediation)(this.remediation).options;return!!(t&&t.length&&((0,d.isAuthenticator)(n)&&n.id||this.findMatchedOption(t,r)))}},{key:"getNextStep",value:function(){var e=(0,i.default)((0,c.default)(l.prototype),"getNextStep",this).call(this),t=(0,f.getAuthenticatorFromRemediation)(this.remediation).options.map((function(e){return{label:e.label,value:e.relatesTo.key}}));return Object.assign(Object.assign({},e),{options:t})}},{key:"mapAuthenticator",value:function(e){var t=this.values,n=t.authenticators,r=t.authenticator;if((0,d.isAuthenticator)(r)&&r.id)return this.selectedAuthenticator=r,r;var o=e.options,a=(0,h.findMatchedOption)(n,o);return this.selectedAuthenticator=a.relatesTo,this.selectedOption=a,{id:null==a?void 0:a.value.form.value.find((function(e){return"id"===e.name})).value}}},{key:"getInputAuthenticator",value:function(){return{name:"authenticator",key:"string"}}},{key:"getValuesAfterProceed",value:function(){var e=this;this.values=(0,i.default)((0,c.default)(l.prototype),"getValuesAfterProceed",this).call(this);var t=this.values.authenticators.filter((function(t){return!0!==(0,h.compareAuthenticators)(t,e.selectedAuthenticator)}));return Object.assign(Object.assign({},this.values),{authenticators:t})}}]),l}(l.Remediator);t.SelectAuthenticator=v},1571:function(e,t,n){"use strict";var r=n(5318);t.VerifyAuthenticator=void 0;var o=r(n(9713)),a=r(n(4575)),i=r(n(3913)),u=r(n(6525)),s=r(n(2205)),c=r(n(8585)),l=r(n(9754)),f=n(8674),d=n(2756);var h=function(e){(0,s.default)(f,e);var t,n,r=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.default)(t);if(n){var o=(0,l.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.default)(this,e)});function f(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.default)(this,f),(t=r.call(this,e,n)).authenticator=(0,d.getAuthenticator)(e),t}return(0,i.default)(f,[{key:"getNextStep",value:function(e){var t,n=(0,u.default)((0,l.default)(f.prototype),"getNextStep",this).call(this,e),r=null===(t=null==e?void 0:e.authenticatorEnrollments)||void 0===t?void 0:t.value;return Object.assign(Object.assign({},n),{authenticatorEnrollments:r})}},{key:"canRemediate",value:function(){return this.authenticator.canVerify(this.values)}},{key:"mapCredentials",value:function(){return this.authenticator.mapCredentials(this.values)}},{key:"getInputCredentials",value:function(e){return this.authenticator.getInputs(e)}},{key:"getValuesAfterProceed",value:function(){var e=this;return this.values=(0,u.default)((0,l.default)(f.prototype),"getValuesAfterProceed",this).call(this),Object.keys(this.values).filter((function(e){return"credentials"!==e})).reduce((function(t,n){return Object.assign(Object.assign({},t),(0,o.default)({},n,e.values[n]))}),{})}}]),f}(f.Remediator);t.VerifyAuthenticator=h},7873:function(e,t,n){"use strict";var r=n(5318);t.ChallengeAuthenticator=void 0;var o=r(n(4575)),a=r(n(2205)),i=r(n(8585)),u=r(n(9754));var s=function(e){(0,a.default)(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.default)(this,e)});function s(){return(0,o.default)(this,s),r.apply(this,arguments)}return s}(n(1571).VerifyAuthenticator);t.ChallengeAuthenticator=s,s.remediationName="challenge-authenticator"},6759:function(e,t,n){"use strict";var r=n(5318);t.ChallengePoll=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),u=r(n(8585)),s=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canRemediate",value:function(){return!!this.values.startPolling||"challenge-poll"===this.options.step}}]),c}(n(9084).EnrollPoll);t.ChallengePoll=c,c.remediationName="challenge-poll"},7282:function(e,t,n){"use strict";var r=n(5318);t.EnrollAuthenticator=void 0;var o=r(n(4575)),a=r(n(2205)),i=r(n(8585)),u=r(n(9754));var s=function(e){(0,a.default)(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.default)(this,e)});function s(){return(0,o.default)(this,s),r.apply(this,arguments)}return s}(n(1571).VerifyAuthenticator);t.EnrollAuthenticator=s,s.remediationName="enroll-authenticator"},9084:function(e,t,n){"use strict";var r=n(5318);t.EnrollPoll=void 0;var o=r(n(9713)),a=r(n(4575)),i=r(n(3913)),u=r(n(6525)),s=r(n(2205)),c=r(n(8585)),l=r(n(9754));var f=function(e){(0,s.default)(f,e);var t,n,r=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.default)(t);if(n){var o=(0,l.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.default)(this,e)});function f(){return(0,a.default)(this,f),r.apply(this,arguments)}return(0,i.default)(f,[{key:"canRemediate",value:function(){return!!this.values.startPolling||"enroll-poll"===this.options.step}},{key:"getNextStep",value:function(e){var t=(0,u.default)((0,l.default)(f.prototype),"getNextStep",this).call(this,e),n=this.getAuthenticator();return!n&&(null==e?void 0:e.currentAuthenticator)&&(n=e.currentAuthenticator.value),Object.assign(Object.assign({},t),{authenticator:n,poll:{required:!0,refresh:this.remediation.refresh}})}},{key:"getValuesAfterProceed",value:function(){var e=this;return Object.keys(this.values).filter((function(e){return"startPolling"!==e})).reduce((function(t,n){return Object.assign(Object.assign({},t),(0,o.default)({},n,e.values[n]))}),{})}}]),f}(n(8674).Remediator);t.EnrollPoll=f,f.remediationName="enroll-poll"},4218:function(e,t,n){"use strict";var r=n(5318);t.EnrollProfile=void 0;var o=r(n(319)),a=r(n(9713)),i=r(n(4575)),u=r(n(3913)),s=r(n(2205)),c=r(n(8585)),l=r(n(9754));var f=function(e){(0,s.default)(f,e);var t,n,r=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.default)(t);if(n){var o=(0,l.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.default)(this,e)});function f(){return(0,i.default)(this,f),r.apply(this,arguments)}return(0,u.default)(f,[{key:"canRemediate",value:function(){var e=this.getData().userProfile;return!!e&&this.remediation.value.find((function(e){return"userProfile"===e.name})).form.value.reduce((function(t,n){return n.required&&(t=t&&!!e[n.name]),t}),!0)}},{key:"mapUserProfile",value:function(e){var t=this,n=e.form.value.map((function(e){return e.name})).reduce((function(e,n){return t.values[n]?Object.assign(Object.assign({},e),(0,a.default)({},n,t.values[n])):e}),{});if(0!==Object.keys(n).length)return n}},{key:"getInputUserProfile",value:function(e){return(0,o.default)(e.form.value)}},{key:"getErrorMessages",value:function(e){return e.value[0].form.value.reduce((function(e,t){return t.messages&&e.push(t.messages.value[0].message),e}),[])}}]),f}(n(8674).Remediator);t.EnrollProfile=f,f.remediationName="enroll-profile"},9580:function(e,t,n){"use strict";var r=n(5318);t.EnrollmentChannelData=void 0;var o=r(n(9713)),a=r(n(4575)),i=r(n(3913)),u=r(n(6525)),s=r(n(2205)),c=r(n(8585)),l=r(n(9754));var f=function(e){(0,s.default)(f,e);var t,n,r=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.default)(t);if(n){var o=(0,l.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.default)(this,e)});function f(){return(0,a.default)(this,f),r.apply(this,arguments)}return(0,i.default)(f,[{key:"getInputEmail",value:function(){return[{name:"email",type:"string",required:!0,label:"Email"}]}},{key:"getInputPhoneNumber",value:function(){return[{name:"phoneNumber",type:"string",required:!0,label:"Phone Number"}]}},{key:"canRemediate",value:function(){return Boolean(this.values.email||this.values.phoneNumber)}},{key:"getNextStep",value:function(e){var t=(0,u.default)((0,l.default)(f.prototype),"getNextStep",this).call(this),n=e.currentAuthenticator.value;return Object.assign(Object.assign({},t),{authenticator:n})}},{key:"getData",value:function(){return{stateHandle:this.values.stateHandle,email:this.values.email,phoneNumber:this.values.phoneNumber}}},{key:"getValuesAfterProceed",value:function(){var e=this;return Object.keys(this.values).filter((function(e){return!["email","phoneNumber"].includes(e)})).reduce((function(t,n){return Object.assign(Object.assign({},t),(0,o.default)({},n,e.values[n]))}),{})}}]),f}(n(8674).Remediator);t.EnrollmentChannelData=f,f.remediationName="enrollment-channel-data"},3263:function(e,t,n){"use strict";var r=n(5318);t.Identify=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),u=r(n(8585)),s=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function c(){var e;return(0,o.default)(this,c),(e=r.apply(this,arguments)).map={identifier:["username"]},e}return(0,a.default)(c,[{key:"canRemediate",value:function(){return!!this.getData().identifier}},{key:"mapCredentials",value:function(){var e=this.values,t=e.credentials,n=e.password;if(t||n)return t||{passcode:n}}},{key:"getInputCredentials",value:function(e){return Object.assign(Object.assign({},e.form.value[0]),{name:"password",required:e.required})}}]),c}(n(8674).Remediator);t.Identify=c,c.remediationName="identify"},2818:function(e,t,n){"use strict";var r=n(5318);t.ReEnrollAuthenticator=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),u=r(n(8585)),s=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"mapCredentials",value:function(){var e=this.values.newPassword;if(e)return{passcode:e}}},{key:"getInputCredentials",value:function(e){var t="password"===this.getAuthenticator().type?"newPassword":"verificationCode";return Object.assign(Object.assign({},e.form.value[0]),{name:t})}}]),c}(n(8674).Remediator);t.ReEnrollAuthenticator=c,c.remediationName="reenroll-authenticator"},3963:function(e,t,n){"use strict";var r=n(5318);t.RedirectIdp=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),u=r(n(8585)),s=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canRemediate",value:function(){return!1}},{key:"getNextStep",value:function(){var e=this.remediation;return{name:e.name,type:e.type,idp:e.idp,href:e.href}}}]),c}(n(8674).Remediator);t.RedirectIdp=c,c.remediationName="redirect-idp"},6703:function(e,t,n){"use strict";var r=n(5318);t.ResetAuthenticator=void 0;var o=r(n(4575)),a=r(n(2205)),i=r(n(8585)),u=r(n(9754));var s=function(e){(0,a.default)(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.default)(this,e)});function s(){return(0,o.default)(this,s),r.apply(this,arguments)}return s}(n(1571).VerifyAuthenticator);t.ResetAuthenticator=s,s.remediationName="reset-authenticator"},7459:function(e,t,n){"use strict";var r=n(5318);t.SelectAuthenticatorAuthenticate=void 0;var o=r(n(319)),a=r(n(4575)),i=r(n(2205)),u=r(n(8585)),s=r(n(9754)),c=n(6255),l=n(5323),f=n(6473);var d=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function c(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,a.default)(this,c);var s="recoverPassword"===(t=r.call(this,e,i,u)).options.flow,d=null===(n=(0,l.getAuthenticatorFromRemediation)(e).options)||void 0===n?void 0:n.some((function(e){var t=e.relatesTo;return(null==t?void 0:t.key)===f.AuthenticatorKey.OKTA_PASSWORD}));return d&&(s||t.values.password)&&(t.values.authenticators=[].concat((0,o.default)(t.values.authenticators||[]),[{key:f.AuthenticatorKey.OKTA_PASSWORD}])),t}return c}(c.SelectAuthenticator);t.SelectAuthenticatorAuthenticate=d,d.remediationName="select-authenticator-authenticate"},6400:function(e,t,n){"use strict";var r=n(5318);t.SelectAuthenticatorEnroll=void 0;var o=r(n(4575)),a=r(n(2205)),i=r(n(8585)),u=r(n(9754));var s=function(e){(0,a.default)(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var o=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.default)(this,e)});function s(){return(0,o.default)(this,s),r.apply(this,arguments)}return s}(n(6255).SelectAuthenticator);t.SelectAuthenticatorEnroll=s,s.remediationName="select-authenticator-enroll"},8064:function(e,t,n){"use strict";var r=n(5318);t.SelectAuthenticatorUnlockAccount=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(6525)),u=r(n(2205)),s=r(n(8585)),c=r(n(9754));var l=function(e){(0,u.default)(l,e);var t,n,r=(t=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.default)(t);if(n){var o=(0,c.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function l(){var e;return(0,o.default)(this,l),(e=r.apply(this,arguments)).map={identifier:["username"]},e}return(0,a.default)(l,[{key:"canRemediate",value:function(){return!!this.getData("identifier")&&(0,i.default)((0,c.default)(l.prototype),"canRemediate",this).call(this)}},{key:"mapAuthenticator",value:function(e){var t,n,r,o=(0,i.default)((0,c.default)(l.prototype),"mapAuthenticator",this).call(this,e),a=null===(t=this.selectedOption)||void 0===t?void 0:t.value.form.value.find((function(e){return"methodType"===e.name})),u=this.values.methodType||(null==a?void 0:a.value)||(null===(r=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n[0])||void 0===r?void 0:r.value);return u?Object.assign(Object.assign({},o),{methodType:u}):o}},{key:"getInputUsername",value:function(){return{name:"username",key:"string"}}}]),l}(n(6255).SelectAuthenticator);t.SelectAuthenticatorUnlockAccount=l,l.remediationName="select-authenticator-unlock-account"},2552:function(e,t,n){"use strict";var r=n(5318);t.SelectEnrollProfile=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),u=r(n(8585)),s=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canRemediate",value:function(){return!0}}]),c}(n(8674).Remediator);t.SelectEnrollProfile=c,c.remediationName="select-enroll-profile"},4982:function(e,t,n){"use strict";var r=n(5318);t.SelectEnrollmentChannel=void 0;var o=r(n(9713)),a=r(n(4575)),i=r(n(3913)),u=r(n(6525)),s=r(n(2205)),c=r(n(8585)),l=r(n(9754)),f=n(8674),d=n(5323);var h=function(e){(0,s.default)(f,e);var t,n,r=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.default)(t);if(n){var o=(0,l.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.default)(this,e)});function f(){return(0,a.default)(this,f),r.apply(this,arguments)}return(0,i.default)(f,[{key:"canRemediate",value:function(){return Boolean(this.values.channel)}},{key:"getNextStep",value:function(e){var t=(0,u.default)((0,l.default)(f.prototype),"getNextStep",this).call(this),n=this.getChannels(),r=e.currentAuthenticator.value;return Object.assign(Object.assign(Object.assign({},t),n&&{options:n}),{authenticator:r})}},{key:"getChannels",value:function(){var e;return null===(e=(0,d.getAuthenticatorFromRemediation)(this.remediation).value.form.value.find((function(e){return"channel"===e.name})))||void 0===e?void 0:e.options}},{key:"getData",value:function(){return{authenticator:{id:this.remediation.value[0].value.form.value[0].value,channel:this.values.channel},stateHandle:this.values.stateHandle}}},{key:"getValuesAfterProceed",value:function(){var e=this;return Object.keys(this.values).filter((function(e){return"channel"!==e})).reduce((function(t,n){return Object.assign(Object.assign({},t),(0,o.default)({},n,e.values[n]))}),{})}}]),f}(f.Remediator);t.SelectEnrollmentChannel=h,h.remediationName="select-enrollment-channel"},554:function(e,t,n){"use strict";var r=n(5318);t.Skip=void 0;var o=r(n(4575)),a=r(n(3913)),i=r(n(2205)),u=r(n(8585)),s=r(n(9754));var c=function(e){(0,i.default)(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.default)(t);if(n){var o=(0,s.default)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.default)(this,e)});function c(){return(0,o.default)(this,c),r.apply(this,arguments)}return(0,a.default)(c,[{key:"canRemediate",value:function(){return!!this.values.skip||"skip"===this.options.step}}]),c}(n(8674).Remediator);t.Skip=c,c.remediationName="skip"},6749:function(e,t,n){"use strict";var r=n(8674);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(7282);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(9084);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(4982);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var u=n(9580);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var s=n(7873);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var c=n(6759);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=n(6703);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var f=n(4218);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var d=n(3263);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var h=n(2818);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=n(3963);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var v=n(7459);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===v[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}}))}));var g=n(6400);Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var y=n(8064);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===y[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}}))}));var m=n(2552);Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===m[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return m[e]}}))}));var b=n(8129);Object.keys(b).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===b[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return b[e]}}))}));var k=n(6874);Object.keys(k).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===k[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return k[e]}}))}));var w=n(554);Object.keys(w).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===w[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return w[e]}}))}))},5323:function(e,t){"use strict";t.getAllValues=function(e){var t;return null===(t=e.value)||void 0===t?void 0:t.map((function(e){return e.name}))},t.getRequiredValues=function(e){var t;return null===(t=e.value)||void 0===t?void 0:t.reduce((function(e,t){return t.required&&e.push(t.name),e}),[])},t.titleCase=function(e){return e.charAt(0).toUpperCase()+e.substring(1)},t.getAuthenticatorFromRemediation=function(e){return e.value.find((function(e){return"authenticator"===e.name}))}},8710:function(e,t,n){"use strict";var r=n(5318);t.run=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,o.default.mark((function n(){var r,a,i,u,s,c,l,d,h,m,w,O,S,E,T,_,A,x,R,P,j,M;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r={options:t,values:p(t)},r=v(e,r),n.prev=2,n.next=5,g(e,r);case 5:return r=n.sent,n.next=8,y(r);case 8:r=n.sent,n.next=14;break;case 11:n.prev=11,n.t0=n.catch(2),r=k(n.t0,r);case 14:return n.next=16,b(e,r);case 16:return r=n.sent,i=(a=r).idxResponse,u=a.meta,s=a.shouldClearTransaction,c=a.clearSharedStorage,l=a.status,d=a.enabledFeatures,h=a.availableSteps,m=a.tokens,w=a.nextStep,O=a.messages,S=a.error,E=a.interactionCode,s?e.transactionManager.clear({clearSharedStorage:c}):((0,f.saveTransactionMeta)(e,Object.assign({},u)),i&&(T=i.rawIdxState,_=i.requestDidSucceed,e.transactionManager.saveIdxResponse({rawIdxResponse:T,requestDidSucceed:_}))),x=(A=i||{}).actions,R=A.context,P=A.neededToProceed,j=A.proceed,M=A.rawIdxState,n.abrupt("return",Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({status:l},u&&{meta:u}),d&&{enabledFeatures:d}),h&&{availableSteps:h}),m&&{tokens:m}),w&&{nextStep:w}),O&&O.length&&{messages:O}),S&&{error:S}),{interactionCode:E,actions:x,context:R,neededToProceed:P,proceed:j,rawIdxState:M}));case 21:case"end":return n.stop()}}),n,null,[[2,11]])})))};var o=r(n(7757)),a=n(1440),i=n(1750),u=n(4122),s=n(4270),c=n(858),l=n(3675),f=n(4456),d=n(9581),h=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))};function p(e){var t=Object.assign({},e);return["flow","remediators","actions","withCredentials","step"].forEach((function(e){delete t[e]})),t}function v(e,t){var n=t.options,r=n.flow,o=n.withCredentials,a=n.remediators,i=n.actions,u=c.IdxStatus.PENDING;if(r=r||e.idx.getFlow()||"default"){e.idx.setFlow(r);var l=(0,s.getFlowSpecification)(e,r);o=void 0!==o?o:l.withCredentials,a=a||l.remediators,i=i||l.actions}return Object.assign(Object.assign({},t),{options:Object.assign(Object.assign({},n),{flow:r,withCredentials:o,remediators:a,actions:i}),status:u})}function g(e,t){return h(this,void 0,void 0,o.default.mark((function n(){var r,u,s,c,l,d,h,p,v,g,y,m;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=t.options,u=r.stateHandle,s=r.withCredentials,c=r.version,l=r.state,d=r.scopes,h=r.recoveryToken,p=r.activationToken,!u){n.next=8;break}return n.next=5,(0,i.introspect)(e,{withCredentials:s,version:c,stateHandle:u});case 5:v=n.sent,n.next=20;break;case 8:if(g=(0,f.getSavedTransactionMeta)(e,{state:l,recoveryToken:h,activationToken:p}),y=null==g?void 0:g.interactionHandle){n.next=17;break}return e.transactionManager.clear(),n.next=14,(0,a.interact)(e,{withCredentials:s,state:l,scopes:d,activationToken:p,recoveryToken:h});case 14:m=n.sent,y=m.interactionHandle,g=m.meta;case 17:return n.next=19,(0,i.introspect)(e,{withCredentials:s,version:c,interactionHandle:y});case 19:v=n.sent;case 20:return n.abrupt("return",Object.assign(Object.assign({},t),{idxResponse:v,meta:g}));case 21:case"end":return n.stop()}}),n)})))}function y(e){return h(this,void 0,void 0,o.default.mark((function t(){var n,r,a,i,s,c,l,f,d,h,p,v;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.idxResponse,r=e.options,a=e.values,i=r.autoRemediate,s=r.remediators,c=r.actions,l=r.flow,f=r.step,!1!==i&&(s||c||f)){t.next=5;break}return t.abrupt("return",e);case 5:return a=Object.assign(Object.assign({},a),{stateHandle:n.rawIdxState.stateHandle}),t.next=8,(0,u.remediate)(n,a,{remediators:s,actions:c,flow:l,step:f});case 8:return d=t.sent,h=d.idxResponse,p=d.nextStep,v=d.canceled,n=h,t.abrupt("return",Object.assign(Object.assign({},e),{idxResponse:n,nextStep:p,canceled:v}));case 14:case"end":return t.stop()}}),t)})))}function m(e,t){return h(this,void 0,void 0,o.default.mark((function n(){var r,a,i,u,s,c,l,f,d,h;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=t.meta,a=t.idxResponse,i=a.interactionCode,u=r.clientId,s=r.codeVerifier,c=r.ignoreSignature,l=r.redirectUri,f=r.urls,d=r.scopes,n.next=5,e.token.exchangeCodeForTokens({interactionCode:i,clientId:u,codeVerifier:s,ignoreSignature:c,redirectUri:l,scopes:d},f);case 5:return h=n.sent,n.abrupt("return",h.tokens);case 7:case"end":return n.stop()}}),n)})))}function b(e,t){return h(this,void 0,void 0,o.default.mark((function n(){var r,a,i,u,s,l,f,h,p,v,g,y,b;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=t.options,a=t.idxResponse,i=t.canceled,u=t.status,s=r.exchangeCodeForTokens,l=!1,f=!0,a&&(v=(0,d.getEnabledFeatures)(a),g=(0,d.getAvailableSteps)(a),y=(0,d.getMessagesFromResponse)(a),b=(0,d.isTerminalResponse)(a)),!b){n.next=11;break}u=c.IdxStatus.TERMINAL,l=!0,f=!1,n.next=28;break;case 11:if(!i){n.next=16;break}u=c.IdxStatus.CANCELED,l=!0,n.next=28;break;case 16:if(!(null==a?void 0:a.interactionCode)){n.next=28;break}if(h=a.interactionCode,!1!==s){n.next=23;break}u=c.IdxStatus.SUCCESS,l=!1,n.next=28;break;case 23:return n.next=25,m(e,t);case 25:p=n.sent,u=c.IdxStatus.SUCCESS,l=!0;case 28:return n.abrupt("return",Object.assign(Object.assign({},t),{status:u,interactionCode:h,tokens:p,shouldClearTransaction:l,clearSharedStorage:f,enabledFeatures:v,availableSteps:g,messages:y,terminal:b}));case 29:case"end":return n.stop()}}),n)})))}function k(e,t){var n=t.error,r=t.status;t.shouldClearTransaction;if(!(0,l.isIdxResponse)(e))throw e;return n=e,r=c.IdxStatus.FAILURE,!0,Object.assign(Object.assign({},t),{error:n,status:r,shouldClearTransaction:true})}},3248:function(e,t,n){"use strict";var r=n(5318);t.startTransaction=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,void 0,void 0,o.default.mark((function n(){return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e.transactionManager.clear(),n.abrupt("return",(0,a.run)(e,Object.assign({exchangeCodeForTokens:!1},t)));case 2:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(8710),i=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))}},4456:function(e,t,n){"use strict";var r=n(5318);t.createTransactionMeta=s,t.hasSavedInteractionHandle=function(e,t){var n=c(e,t);return!!(null==n?void 0:n.interactionHandle)},t.getSavedTransactionMeta=c,t.getTransactionMeta=function(e,t){return u(this,void 0,void 0,o.default.mark((function n(){var r;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=(0,a.removeNils)(t),t=Object.assign(Object.assign({},e.options),t),!(r=c(e,t))){n.next=5;break}return n.abrupt("return",r);case 5:return n.abrupt("return",s(e,t));case 6:case"end":return n.stop()}}),n)})))},t.saveTransactionMeta=function(e,t){e.transactionManager.save(t,{muteWarning:!0})},t.clearTransactionMeta=function(e){e.transactionManager.clear()},t.isTransactionMetaValid=l,t.isTransactionMetaValidForFlow=f,t.isTransactionMetaValidForOptions=d;var o=r(n(7757)),a=n(8965),i=n(6496),u=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))};function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(this,void 0,void 0,o.default.mark((function n(){var r,a,u,s,c,l,f,d,h,p,v,g;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.token.prepareTokenParams(t);case 2:return r=n.sent,a=(0,i.createOAuthMeta)(e,r),u=Object.assign(Object.assign({},e.options),t),s=u.flow,c=void 0===s?"default":s,l=u.withCredentials,f=void 0===l||l,d=u.activationToken,h=void 0===d?void 0:d,p=u.recoveryToken,v=void 0===p?void 0:p,g=Object.assign(Object.assign({},a),{flow:c,withCredentials:f,activationToken:h,recoveryToken:v}),n.abrupt("return",g);case 7:case"end":return n.stop()}}),n)})))}function c(e,t){var n;t=(0,a.removeNils)(t),t=Object.assign(Object.assign({},e.options),t);try{n=e.transactionManager.load(t)}catch(e){}if(n)return l(n,t)?n:void(0,a.warn)("Saved transaction meta does not match the current configuration. This may indicate that two apps are sharing a storage key.")}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=["issuer","clientId","redirectUri","state","codeChallenge","codeChallengeMethod","activationToken","recoveryToken"];if(!1===d(e,t,n))return!1;var r=t.flow;return!1!==f(e,r)}function f(e,t){return!(t&&"default"!==t&&"proceed"!==t)||t===e.flow}function d(e,t,n){return!n.some((function(n){var r=t[n];if(r&&r!==e[n])return!0}))}},3675:function(e,t){"use strict";function n(e){return e&&e.version}t.isRawIdxResponse=n,t.isIdxResponse=function(e){return e&&n(e.rawIdxState)}},6473:function(e,t){"use strict";var n,r,o;t.isAuthenticator=function(e){return e&&(e.key||e.id)},t.IdxFeature=t.AuthenticatorKey=t.IdxStatus=void 0,t.IdxStatus=n,function(e){e.SUCCESS="SUCCESS",e.PENDING="PENDING",e.FAILURE="FAILURE",e.TERMINAL="TERMINAL",e.CANCELED="CANCELED"}(n||(t.IdxStatus=n={})),t.AuthenticatorKey=r,function(e){e.OKTA_PASSWORD="okta_password",e.OKTA_EMAIL="okta_email",e.PHONE_NUMBER="phone_number",e.GOOGLE_AUTHENTICATOR="google_otp",e.SECURITY_QUESTION="security_question",e.OKTA_VERIFY="okta_verify",e.WEBAUTHN="webauthn"}(r||(t.AuthenticatorKey=r={})),t.IdxFeature=o,function(e){e.PASSWORD_RECOVERY="recover-password",e.REGISTRATION="enroll-profile",e.SOCIAL_IDP="redirect-idp",e.ACCOUNT_UNLOCK="unlock-account"}(o||(t.IdxFeature=o={}))},5752:function(e,t,n){"use strict";var r=n(5318);t.unlockAccount=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(this,void 0,void 0,o.default.mark((function n(){var r,l;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.flow="unlockAccount",(0,i.hasSavedInteractionHandle)(e)){n.next=8;break}return n.next=4,(0,u.startTransaction)(e,Object.assign(Object.assign({},t),{autoRemediate:!1}));case 4:if(r=n.sent,!(l=r.enabledFeatures)||l.includes(c.IdxFeature.ACCOUNT_UNLOCK)){n.next=8;break}throw new s.AuthSdkError("Self Service Account Unlock is not supported based on your current org configuration.");case 8:return n.abrupt("return",(0,a.run)(e,Object.assign({},t)));case 9:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(8710),i=n(4456),u=n(3248),s=n(5705),c=n(858),l=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))}},9581:function(e,t,n){"use strict";var r=n(5318),o=n(8);t.isTerminalResponse=function(e){var t=e.neededToProceed,n=e.interactionCode;return!t.length&&!n},t.canSkipFn=function(e){return e.neededToProceed.some((function(e){return"skip"===e.name}))},t.canResendFn=function(e){return Object.keys(e.actions).some((function(e){return e.includes("resend")}))},t.getMessagesFromIdxRemediationValue=f,t.getMessagesFromResponse=function(e){var t,n=[],r=e.rawIdxState,o=e.neededToProceed,i=null===(t=r.messages)||void 0===t?void 0:t.value.map((function(e){return e}));i&&(n=[].concat((0,a.default)(n),(0,a.default)(i)));var u,s=c(o);try{for(s.s();!(u=s.n()).done;){var l=f(u.value.value);l&&(n=[].concat((0,a.default)(n),(0,a.default)(l)))}}catch(e){s.e(e)}finally{s.f()}var d={};return n=n.reduce((function(e,t){var n,r=null===(n=t.i18n)||void 0===n?void 0:n.key;return r&&d[r]?e:(d[r]=t,e=[].concat((0,a.default)(e),[t]))}),[]),n},t.getEnabledFeatures=function(e){var t=[],n=e.actions,r=e.neededToProceed;return n["currentAuthenticator-recover"]&&t.push(u.IdxFeature.PASSWORD_RECOVERY),r.some((function(e){return"select-enroll-profile"===e.name}))&&t.push(u.IdxFeature.REGISTRATION),r.some((function(e){return"redirect-idp"===e.name}))&&t.push(u.IdxFeature.SOCIAL_IDP),r.some((function(e){return"unlock-account"===e.name}))&&t.push(u.IdxFeature.ACCOUNT_UNLOCK),t},t.getAvailableSteps=function(e){var t,n=[],r=Object.values(i).reduce((function(e,t){return t.remediationName&&(e[t.remediationName]=t),e}),{}),o=c(e.neededToProceed);try{for(o.s();!(t=o.n()).done;){var a=t.value,u=r[a.name];if(u){var s=new u(a);n.push(s.getNextStep(e.context))}}}catch(e){o.e(e)}finally{o.f()}return n},t.filterValuesForRemediation=function(e,t){return e.neededToProceed[0].value.reduce((function(e,n){var r=n.name;return e[r]=t[r],e}),{})};var a=r(n(319)),i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var u=a?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(6749)),u=n(6473);function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){u=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw a}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e){if(e&&Array.isArray(e))return e.reduce((function(e,t){if(t.messages&&(e=[].concat((0,a.default)(e),(0,a.default)(t.messages.value))),t.form){var n=f(t.form.value)||[];e=[].concat((0,a.default)(e),(0,a.default)(n))}if(t.options){var r=[];t.options.forEach((function(e){e.value&&"string"!=typeof e.value&&(r=[].concat((0,a.default)(r),[e.value]))}));var o=f(r)||[];e=[].concat((0,a.default)(e),(0,a.default)(o))}return e}),[])}},1964:function(e,t,n){"use strict";t.decodeToken=function(e){var t,n=e.split(".");try{t={header:JSON.parse((0,o.base64UrlToString)(n[0])),payload:JSON.parse((0,o.base64UrlToString)(n[1])),signature:n[2]}}catch(e){throw new r.AuthSdkError("Malformed token")}return t};var r=n(5705),o=n(5637)},8163:function(e,t,n){"use strict";t.convertTokenParamsToOAuthParams=a,t.buildAuthorizeParams=function(e){var t=a(e);return(0,r.toQueryString)(Object.assign(Object.assign({},t),e.extraParams&&Object.assign({},e.extraParams)))};var r=n(8965),o=n(5705);function a(e){if(!e.clientId)throw new o.AuthSdkError("A clientId must be specified in the OktaAuth constructor to get a token");if((0,r.isString)(e.responseType)&&-1!==e.responseType.indexOf(" "))throw new o.AuthSdkError("Multiple OAuth responseTypes must be defined as an array");var t={client_id:e.clientId,code_challenge:e.codeChallenge,code_challenge_method:e.codeChallengeMethod,display:e.display,idp:e.idp,idp_scope:e.idpScope,login_hint:e.loginHint,max_age:e.maxAge,nonce:e.nonce,prompt:e.prompt,redirect_uri:e.redirectUri,response_mode:e.responseMode,response_type:e.responseType,sessionToken:e.sessionToken,state:e.state};if(t=(0,r.removeNils)(t),["idp_scope","response_type"].forEach((function(e){Array.isArray(t[e])&&(t[e]=t[e].join(" "))})),-1!==e.responseType.indexOf("id_token")&&-1===e.scopes.indexOf("openid"))throw new o.AuthSdkError("openid scope must be specified in the scopes argument when requesting an id_token");return t.scope=e.scopes.join(" "),t}},5074:function(e,t,n){"use strict";var r=n(8163);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(8518);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(6308);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}))},8518:function(e,t,n){"use strict";var r=n(5318);t.postToTokenEndpoint=function(e,t,n){!function(e){if(!e.clientId)throw new a.AuthSdkError("A clientId must be specified in the OktaAuth constructor to get a token");if(!e.redirectUri)throw new a.AuthSdkError("The redirectUri passed to /authorize must also be passed to /token");if(!e.authorizationCode&&!e.interactionCode)throw new a.AuthSdkError("An authorization code (returned from /authorize) must be passed to /token");if(!e.codeVerifier)throw new a.AuthSdkError('The "codeVerifier" (generated and saved by your app) must be passed to /token')}(t);var r=function(e,t){var n=(0,i.removeNils)({client_id:t.clientId,redirect_uri:t.redirectUri,grant_type:t.interactionCode?"interaction_code":"authorization_code",code_verifier:t.codeVerifier});t.interactionCode?n.interaction_code=t.interactionCode:t.authorizationCode&&(n.code=t.authorizationCode);var r=e.options.clientSecret;return r&&(n.client_secret=r),(0,i.toQueryString)(n).slice(1)}(e,t);return(0,u.httpRequest)(e,{url:n.tokenUrl,method:"POST",args:r,headers:{"Content-Type":"application/x-www-form-urlencoded"}})},t.postRefreshToken=function(e,t,n){return(0,u.httpRequest)(e,{url:n.tokenUrl,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},args:Object.entries({client_id:t.clientId,grant_type:"refresh_token",scope:n.scopes.join(" "),refresh_token:n.refreshToken}).map((function(e){var t=(0,o.default)(e,2),n=t[0],r=t[1];return n+"="+encodeURIComponent(r)})).join("&")})};var o=r(n(3038)),a=n(5705),i=n(8965),u=n(2924)},6308:function(e,t,n){"use strict";var r=n(5318);t.getWellKnown=u,t.getKey=function(e,t,n){var r=e.storageManager.getHttpCache(e.options.cookies);return u(e,t).then((function(t){var u=t.jwks_uri,s=r.getStorage()[u];if(s&&Date.now()/1e3<s.expiresAt){var c=(0,a.find)(s.response.keys,{kid:n});if(c)return c}return r.clearStorage(u),(0,o.get)(e,u,{cacheResponse:!0}).then((function(e){var t=(0,a.find)(e.keys,{kid:n});if(t)return t;throw new i.default("The key id, "+n+", was not found in the server's keys")}))}))};var o=n(2924),a=n(8965),i=r(n(7948));function u(e,t){var n=t||e.options.issuer;return(0,o.get)(e,n+"/.well-known/openid-configuration",{cacheResponse:!0})}},9732:function(e,t,n){"use strict";t.exchangeCodeForTokens=function(e,t,n){n=n||(0,r.getOAuthUrls)(e,t);var u=t=Object.assign({},(0,r.getDefaultTokenParams)(e),(0,o.clone)(t)),s=u.authorizationCode,c=u.interactionCode,l=u.codeVerifier,f=u.clientId,d=u.redirectUri,h=u.scopes,p=u.ignoreSignature,v=u.state,g={clientId:f,redirectUri:d,authorizationCode:s,interactionCode:c,codeVerifier:l};return(0,a.postToTokenEndpoint)(e,g,n).then((function(t){var r=["token"];-1!==h.indexOf("openid")&&r.push("id_token");var o={clientId:f,redirectUri:d,scopes:h,responseType:r,ignoreSignature:p};return(0,i.handleOAuthResponse)(e,o,t,n).then((function(e){return e.code=s,e.state=v,e}))})).finally((function(){e.transactionManager.clear()}))};var r=n(4736),o=n(8965),a=n(8518),i=n(8723)},5884:function(e,t,n){"use strict";var r=n(5318);t.getToken=function(e,t){if(arguments.length>2)return Promise.reject(new a.default('As of version 3.0, "getToken" takes only a single set of options'));var n=(t=t||{}).popupWindow;return t.popupWindow=void 0,(0,i.prepareTokenParams)(e,t).then((function(r){var i,c;switch(t.sessionToken?Object.assign(r,{prompt:"none",responseMode:"okta_post_message",display:null}):t.idp&&Object.assign(r,{display:"popup"}),c=(0,o.getOAuthUrls)(e,r),i=(t.codeVerifier?c.tokenUrl:c.authorizeUrl)+(0,u.buildAuthorizeParams)(r),r.sessionToken||null===r.display?"IFRAME":"popup"===r.display?"POPUP":"IMPLICIT"){case"IFRAME":var l=(0,o.addPostMessageListener)(e,t.timeout,r.state),f=(0,o.loadFrame)(i);return l.then((function(t){return(0,s.handleOAuthResponse)(e,r,t,c)})).finally((function(){var e;document.body.contains(f)&&(null===(e=f.parentElement)||void 0===e||e.removeChild(f))}));case"POPUP":var d;if("okta_post_message"===r.responseMode){if(!e.features.isPopupPostMessageSupported())throw new a.default("This browser doesn't have full postMessage support");d=(0,o.addPostMessageListener)(e,t.timeout,r.state)}return n&&n.location.assign(i),new Promise((function(e,t){var r=setInterval((function(){n&&!n.closed||(clearInterval(r),t(new a.default("Unable to parse OAuth flow response")))}),100);d.then((function(t){clearInterval(r),e(t)})).catch((function(e){clearInterval(r),t(e)}))})).then((function(t){return(0,s.handleOAuthResponse)(e,r,t,c)})).finally((function(){n&&!n.closed&&n.close()}));default:throw new a.default("The full page redirect flow is not supported")}}))};var o=n(4736),a=r(n(7948)),i=n(3584),u=n(8163),s=n(8723)},457:function(e,t,n){"use strict";var r=n(5318);t.getUserInfo=function(e,t,n){return c(this,void 0,void 0,o.default.mark((function r(){return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t){r.next=4;break}return r.next=3,e.tokenManager.getTokens();case 3:t=r.sent.accessToken;case 4:if(n){r.next=8;break}return r.next=7,e.tokenManager.getTokens();case 7:n=r.sent.idToken;case 8:if(t&&(0,s.isAccessToken)(t)){r.next=10;break}return r.abrupt("return",Promise.reject(new i.AuthSdkError("getUserInfo requires an access token object")));case 10:if(n&&(0,s.isIDToken)(n)){r.next=12;break}return r.abrupt("return",Promise.reject(new i.AuthSdkError("getUserInfo requires an ID token object")));case 12:return r.abrupt("return",(0,u.httpRequest)(e,{url:t.userinfoUrl,method:"GET",accessToken:t.accessToken}).then((function(e){return e.sub===n.claims.sub?e:Promise.reject(new i.AuthSdkError("getUserInfo request was rejected due to token mismatch"))})).catch((function(e){var t;if(e.xhr&&(401===e.xhr.status||403===e.xhr.status)&&(e.xhr.headers&&(0,a.isFunction)(e.xhr.headers.get)&&e.xhr.headers.get("WWW-Authenticate")?t=e.xhr.headers.get("WWW-Authenticate"):(0,a.isFunction)(e.xhr.getResponseHeader)&&(t=e.xhr.getResponseHeader("WWW-Authenticate")),t)){var n=t.match(/error="(.*?)"/)||[],r=t.match(/error_description="(.*?)"/)||[],o=n[1],u=r[1];o&&u&&(e=new i.OAuthError(o,u))}throw e})));case 13:case"end":return r.stop()}}),r)})))};var o=r(n(7757)),a=n(8965),i=n(5705),u=n(2924),s=n(858),c=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))}},941:function(e,t,n){"use strict";t.getWithPopup=function(e,t){if(arguments.length>2)return Promise.reject(new r.AuthSdkError('As of version 3.0, "getWithPopup" takes only a single set of options'));var n=(0,i.loadPopup)("/",t);return t=(0,o.clone)(t)||{},Object.assign(t,{display:"popup",responseMode:"okta_post_message",popupWindow:n}),(0,a.getToken)(e,t)};var r=n(5705),o=n(8965),a=n(5884),i=n(4736)},1081:function(e,t,n){"use strict";var r=n(5318);t.getWithRedirect=function(e,t){return c(this,arguments,void 0,o.default.mark((function n(){var r,c,l,f=arguments;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(f.length>2)){n.next=2;break}return n.abrupt("return",Promise.reject(new a.AuthSdkError('As of version 3.0, "getWithRedirect" takes only a single set of options')));case 2:return t=(0,i.clone)(t)||{},n.next=5,(0,u.prepareTokenParams)(e,t);case 5:r=n.sent,c=(0,u.createOAuthMeta)(e,r),l=c.urls.authorizeUrl+(0,s.buildAuthorizeParams)(r),e.transactionManager.save(c,{oauth:!0}),e.token.getWithRedirect._setLocation(l);case 10:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(5705),i=n(8965),u=n(4736),s=n(8163),c=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))}},73:function(e,t,n){"use strict";t.getWithoutPrompt=function(e,t){return arguments.length>2?Promise.reject(new r.AuthSdkError('As of version 3.0, "getWithoutPrompt" takes only a single set of options')):(t=(0,o.clone)(t)||{},Object.assign(t,{prompt:"none",responseMode:"okta_post_message",display:null}),(0,a.getToken)(e,t))};var r=n(5705),o=n(8965),a=n(5884)},8723:function(e,t,n){"use strict";var r=n(5318);t.handleOAuthResponse=function(e,t,n,r){return f(this,void 0,void 0,o.default.mark((function f(){var h,p,v,g,y,m,b,k,w,O,S,E,T,_;return o.default.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(!1===e.options.pkce||!n.code&&!n.interaction_code){o.next=3;break}return o.abrupt("return",(0,s.exchangeCodeForTokens)(e,Object.assign({},t,{authorizationCode:n.code,interactionCode:n.interaction_code}),r));case 3:if(t=t||(0,l.getDefaultTokenParams)(e),r=r||(0,i.getOAuthUrls)(e,t),h=t.responseType||[],Array.isArray(h)||(h=[h]),p=n.scope?n.scope.split(" "):(0,a.clone)(t.scopes),v=t.clientId||e.options.clientId,d(n,t),g={},y=n.expires_in,m=n.token_type,b=n.access_token,k=n.id_token,w=n.refresh_token,O=Math.floor(Date.now()/1e3),b&&(S=e.token.decode(b),g.accessToken={accessToken:b,claims:S.payload,expiresAt:Number(y)+O,tokenType:m,scopes:p,authorizeUrl:r.authorizeUrl,userinfoUrl:r.userinfoUrl}),w&&(g.refreshToken={refreshToken:w,expiresAt:Number(y)+O,scopes:p,tokenUrl:r.tokenUrl,authorizeUrl:r.authorizeUrl,issuer:r.issuer}),!k){o.next=27;break}return E=e.token.decode(k),T={idToken:k,claims:E.payload,expiresAt:E.payload.exp-E.payload.iat+O,scopes:p,authorizeUrl:r.authorizeUrl,issuer:r.issuer,clientId:v},_={clientId:v,issuer:r.issuer,nonce:t.nonce,accessToken:b},void 0!==t.ignoreSignature&&(_.ignoreSignature=t.ignoreSignature),o.next=26,(0,c.verifyToken)(e,T,_);case 26:g.idToken=T;case 27:if(-1===h.indexOf("token")||g.accessToken){o.next=29;break}throw new u.AuthSdkError('Unable to parse OAuth flow response: response type "token" was requested but "access_token" was not returned.');case 29:if(-1===h.indexOf("id_token")||g.idToken){o.next=31;break}throw new u.AuthSdkError('Unable to parse OAuth flow response: response type "id_token" was requested but "id_token" was not returned.');case 31:return o.abrupt("return",{tokens:g,state:n.state,code:n.code});case 32:case"end":return o.stop()}}),f)})))};var o=r(n(7757)),a=n(8965),i=n(588),u=n(5705),s=n(9732),c=n(805),l=n(4736),f=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))};function d(e,t){if(e.error&&e.error_description)throw new u.OAuthError(e.error,e.error_description);if(e.state!==t.state)throw new u.AuthSdkError("OAuth flow response state doesn't match request state")}},6496:function(e,t,n){"use strict";var r={decodeToken:!0,revokeToken:!0,renewToken:!0,renewTokensWithRefresh:!0,renewTokens:!0,verifyToken:!0,getUserInfo:!0,handleOAuthResponse:!0,exchangeCodeForTokens:!0,getToken:!0,getWithoutPrompt:!0,getWithPopup:!0,getWithRedirect:!0,parseFromUrl:!0};Object.defineProperty(t,"decodeToken",{enumerable:!0,get:function(){return i.decodeToken}}),Object.defineProperty(t,"revokeToken",{enumerable:!0,get:function(){return u.revokeToken}}),Object.defineProperty(t,"renewToken",{enumerable:!0,get:function(){return s.renewToken}}),Object.defineProperty(t,"renewTokensWithRefresh",{enumerable:!0,get:function(){return c.renewTokensWithRefresh}}),Object.defineProperty(t,"renewTokens",{enumerable:!0,get:function(){return l.renewTokens}}),Object.defineProperty(t,"verifyToken",{enumerable:!0,get:function(){return f.verifyToken}}),Object.defineProperty(t,"getUserInfo",{enumerable:!0,get:function(){return d.getUserInfo}}),Object.defineProperty(t,"handleOAuthResponse",{enumerable:!0,get:function(){return h.handleOAuthResponse}}),Object.defineProperty(t,"exchangeCodeForTokens",{enumerable:!0,get:function(){return p.exchangeCodeForTokens}}),Object.defineProperty(t,"getToken",{enumerable:!0,get:function(){return v.getToken}}),Object.defineProperty(t,"getWithoutPrompt",{enumerable:!0,get:function(){return g.getWithoutPrompt}}),Object.defineProperty(t,"getWithPopup",{enumerable:!0,get:function(){return y.getWithPopup}}),Object.defineProperty(t,"getWithRedirect",{enumerable:!0,get:function(){return m.getWithRedirect}}),Object.defineProperty(t,"parseFromUrl",{enumerable:!0,get:function(){return b.parseFromUrl}});var o=n(5074);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(4736);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(1964),u=n(9400),s=n(1735),c=n(9201),l=n(8273),f=n(805),d=n(457),h=n(8723),p=n(9732),v=n(5884),g=n(73),y=n(941),m=n(1081),b=n(5037)},5037:function(e,t,n){"use strict";var r=n(5318);t.getResponseMode=l,t.parseOAuthResponseFromUrl=f,t.cleanOAuthResponseFromUrl=d,t.parseFromUrl=function(e,t){return c(this,void 0,void 0,o.default.mark((function n(){var r,c,l,h;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=t||{},t=(0,u.isString)(t)?{url:t}:t,r=f(e,t),c=r.state,l=e.transactionManager.load({oauth:!0,pkce:e.options.pkce,state:c})){n.next=7;break}return n.abrupt("return",Promise.reject(new a.AuthSdkError("Unable to retrieve OAuth redirect params from storage")));case 7:return h=l.urls,delete l.urls,t.url||d(e,t),n.abrupt("return",(0,s.handleOAuthResponse)(e,l,r,h).catch((function(t){throw(0,i.isInteractionRequiredError)(t)||e.transactionManager.clear({state:c}),t})).then((function(t){return e.transactionManager.clear({state:c}),t})));case 11:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(5705),i=n(4736),u=n(8965),s=n(8723),c=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))};function l(e){var t=e.options.pkce?"query":"fragment";return e.options.responseMode||t}function f(e,t){t=t||{};var n,r=(t=(0,u.isString)(t)?{url:t}:t).url,o=t.responseMode||l(e),s=e.token.parseFromUrl._getLocation();if(!(n="query"===o?r?r.substring(r.indexOf("?")):s.search:r?r.substring(r.indexOf("#")):s.hash))throw new a.AuthSdkError("Unable to parse a token from the url");return(0,i.urlParamsToObject)(n)}function d(e,t){"query"===(t.responseMode||l(e))?function(e){var t=e.token.parseFromUrl._getHistory(),n=e.token.parseFromUrl._getDocument(),r=e.token.parseFromUrl._getLocation();t&&t.replaceState?t.replaceState(null,n.title,r.pathname+r.hash):r.search=""}(e):function(e){var t=e.token.parseFromUrl._getHistory(),n=e.token.parseFromUrl._getDocument(),r=e.token.parseFromUrl._getLocation();t&&t.replaceState?t.replaceState(null,n.title,r.pathname+r.search):r.hash=""}(e)}},1735:function(e,t,n){"use strict";var r=n(5318);t.renewToken=function(e,t){return c(this,void 0,void 0,o.default.mark((function n(){var r,a,c,d,h,p;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if((0,i.isIDToken)(t)||(0,i.isAccessToken)(t)||l(),!(r=e.tokenManager.getTokensSync()).refreshToken){n.next=7;break}return n.next=5,(0,s.renewTokensWithRefresh)(e,{scopes:t.scopes},r.refreshToken);case 5:return r=n.sent,n.abrupt("return",f(t,r));case 7:return a=e.options.pkce?"code":(0,i.isAccessToken)(t)?"token":"id_token",c=t.scopes,d=t.authorizeUrl,h=t.userinfoUrl,p=t.issuer,n.abrupt("return",(0,u.getWithoutPrompt)(e,{responseType:a,scopes:c,authorizeUrl:d,userinfoUrl:h,issuer:p}).then((function(e){return f(t,e.tokens)})));case 10:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(5705),i=n(858),u=n(73),s=n(9201),c=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))};function l(){throw new a.AuthSdkError("Renew must be passed a token with an array of scopes and an accessToken or idToken")}function f(e,t){return(0,i.isIDToken)(e)?t.idToken:(0,i.isAccessToken)(e)?t.accessToken:void l()}},8273:function(e,t,n){"use strict";var r=n(5318);t.renewTokens=function(e,t){return c(this,void 0,void 0,o.default.mark((function n(){var r,c,l,f,d,h,p,v,g;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(r=e.tokenManager.getTokensSync()).refreshToken){n.next=3;break}return n.abrupt("return",(0,u.renewTokensWithRefresh)(e,t||{},r.refreshToken));case 3:if(r.accessToken||r.idToken){n.next=5;break}throw new a.AuthSdkError("renewTokens() was called but there is no existing token");case 5:if(c=r.accessToken||{},l=r.idToken||{},f=c.scopes||l.scopes){n.next=10;break}throw new a.AuthSdkError("renewTokens: invalid tokens: could not read scopes");case 10:if(d=c.authorizeUrl||l.authorizeUrl){n.next=13;break}throw new a.AuthSdkError("renewTokens: invalid tokens: could not read authorizeUrl");case 13:return h=c.userinfoUrl||e.options.userinfoUrl,p=l.issuer||e.options.issuer,t=Object.assign({scopes:f,authorizeUrl:d,userinfoUrl:h,issuer:p},t),e.options.pkce?t.responseType="code":(v=(0,s.getDefaultTokenParams)(e),g=v.responseType,t.responseType=g),n.abrupt("return",(0,i.getWithoutPrompt)(e,t).then((function(e){return e.tokens})));case 18:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(5705),i=n(73),u=n(9201),s=n(4736),c=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))}},9201:function(e,t,n){"use strict";var r=n(5318);t.renewTokensWithRefresh=function(e,t,n){return l(this,void 0,void 0,o.default.mark((function r(){var l,f,d,h,p,v,g;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(l=e.options.clientId){r.next=3;break}throw new a.AuthSdkError("A clientId must be specified in the OktaAuth constructor to renew tokens");case 3:return f=Object.assign({},t,{clientId:l}),r.next=6,(0,c.postRefreshToken)(e,f,n);case 6:return d=r.sent,h=(0,i.getOAuthUrls)(e,t),r.next=10,(0,s.handleOAuthResponse)(e,f,d,h);case 10:return p=r.sent,v=p.tokens,(g=v.refreshToken)&&!(0,u.isSameRefreshToken)(g,n)&&e.tokenManager.updateRefreshToken(g),r.abrupt("return",v);case 15:case"end":return r.stop()}}),r)})))};var o=r(n(7757)),a=n(5705),i=n(588),u=n(9849),s=n(8723),c=n(8518),l=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))}},9400:function(e,t,n){"use strict";var r=n(5318);t.revokeToken=function(e,t){return l(this,void 0,void 0,o.default.mark((function n(){var r,l,f,d,h,p,v;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r="",l="",t&&(r=t.accessToken,l=t.refreshToken),r||l){n.next=5;break}throw new c.default("A valid access or refresh token object is required");case 5:if(f=e.options.clientId,d=e.options.clientSecret,f){n.next=9;break}throw new c.default("A clientId must be specified in the OktaAuth constructor to revoke a token");case 9:return h=(0,u.getOAuthUrls)(e).revokeUrl,p=(0,i.toQueryString)({token_type_hint:l?"refresh_token":"access_token",token:l||r}).slice(1),v=d?(0,s.btoa)("".concat(f,":").concat(d)):(0,s.btoa)(f),n.abrupt("return",(0,a.post)(e,h,p,{headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Basic "+v}}));case 13:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(2924),i=n(8965),u=n(588),s=n(5637),c=r(n(7948)),l=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))}},6650:function(e,t,n){"use strict";t.addListener=o,t.removeListener=a,t.loadFrame=function(e){var t=document.createElement("iframe");return t.style.display="none",t.src=e,document.body.appendChild(t)},t.loadPopup=function(e,t){var n=t.popupTitle||"External Identity Provider User Authentication";return window.open(e,n,"toolbar=no, scrollbars=yes, resizable=yes, top=100, left=500, width=600, height=600")},t.addPostMessageListener=function(e,t,n){var i,u;return new Promise((function(a,s){i=function(t){if(t.data&&t.data.state===n)return t.origin!==e.getIssuerOrigin()?s(new r.AuthSdkError("The request does not match client configuration")):void a(t.data)},o(window,"message",i),u=setTimeout((function(){s(new r.AuthSdkError("OAuth flow timed out"))}),t||12e4)})).finally((function(){clearTimeout(u),a(window,"message",i)}))};var r=n(5705);function o(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent("on"+t,n)}function a(e,t,n){e.removeEventListener?e.removeEventListener(t,n):e.detachEvent("on"+t,n)}},6588:function(e,t,n){"use strict";t.getDefaultTokenParams=function(e){var t=e.options,n=t.pkce,i=t.clientId,u=t.redirectUri,s=t.responseType,c=t.responseMode,l=t.scopes,f=t.state,d=t.ignoreSignature,h=(0,o.isBrowser)()?window.location.href:void 0;return(0,a.removeNils)({pkce:n,clientId:i,redirectUri:u||h,responseType:s||["token","id_token"],responseMode:c,state:f||(0,r.generateState)(),nonce:(0,r.generateNonce)(),scopes:l||["openid","email"],ignoreSignature:d})};var r=n(588),o=n(9426),a=n(8965)},6093:function(e,t){"use strict";t.isInteractionRequiredError=function(e){return"OAuthError"===e.name&&"interaction_required"===e.errorCode},t.isAuthorizationCodeError=function(e,t){if("AuthApiError"!==t.name)return!1;var n=t.xhr,r=null==n?void 0:n.responseJSON;return e.options.pkce&&"invalid_grant"===(null==r?void 0:r.error)}},4736:function(e,t,n){"use strict";var r=n(5318),o={pkce:!0};Object.defineProperty(t,"pkce",{enumerable:!0,get:function(){return f.default}});var a=n(6650);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(6588);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var u=n(6093);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var s=n(9244);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var c=n(588);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=n(3769);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var f=r(n(6973)),d=n(3584);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var h=n(9849);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=n(7724);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var v=n(3385);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===v[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}}))}));var g=n(8031);Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}))},9244:function(e,t){"use strict";function n(e){return/((id|access)_token=)/i.test(e)}function r(e){return/(code=)/i.test(e)}function o(e){return/(interaction_code=)/i.test(e)}function a(e){return/(error=)/i.test(e)||/(error_description)/i.test(e)}function i(e,t){var n=t.options;return!(!e||!n.redirectUri)&&0===e.indexOf(n.redirectUri)}function u(e){return e.pkce||"code"===e.responseType||"query"===e.responseMode}function s(e){return u(e)&&"fragment"!==e.responseMode?window.location.search:window.location.hash}function c(e){if(!i(window.location.href,e))return!1;var t=u(e.options),c=s(e.options);return!!a(c)||(t?r(c)||o(c):n(window.location.hash))}t.hasTokensInHash=n,t.hasAuthorizationCode=r,t.hasInteractionCode=o,t.hasErrorInUrl=a,t.isRedirectUri=i,t.isCodeFlow=u,t.getHashOrSearch=s,t.isLoginRedirect=c,t.isInteractionRequired=function(e,t){if(!t){if(!c(e))return!1;t=s(e.options)}return/(error=interaction_required)/i.test(t)}},588:function(e,t,n){"use strict";var r=n(5318);t.generateState=function(){return(0,o.genRandomString)(64)},t.generateNonce=function(){return(0,o.genRandomString)(64)},t.getOAuthBaseUrl=u,t.getOAuthDomain=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i(e,t),r=n.split("/oauth2")[0];return r},t.getOAuthUrls=function(e,t){if(arguments.length>2)throw new a.default('As of version 3.0, "getOAuthUrls" takes only a single set of options');t=t||{};var n=(0,o.removeTrailingSlash)(t.authorizeUrl)||e.options.authorizeUrl,r=i(e,t),s=(0,o.removeTrailingSlash)(t.userinfoUrl)||e.options.userinfoUrl,c=(0,o.removeTrailingSlash)(t.tokenUrl)||e.options.tokenUrl,l=(0,o.removeTrailingSlash)(t.logoutUrl)||e.options.logoutUrl,f=(0,o.removeTrailingSlash)(t.revokeUrl)||e.options.revokeUrl,d=u(e,t);return{issuer:r,authorizeUrl:n=n||d+"/v1/authorize",userinfoUrl:s=s||d+"/v1/userinfo",tokenUrl:c=c||d+"/v1/token",revokeUrl:f=f||d+"/v1/revoke",logoutUrl:l=l||d+"/v1/logout"}};var o=n(8965),a=r(n(7948));function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,o.removeTrailingSlash)(t.issuer)||e.options.issuer;return n}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i(e,t),r=n.indexOf("/oauth2")>0?n:n+"/oauth2";return r}},3769:function(e,t,n){"use strict";t.createOAuthMeta=function(e,t){var n={issuer:e.options.issuer,urls:(0,r.getOAuthUrls)(e,t),clientId:t.clientId,redirectUri:t.redirectUri,responseType:t.responseType,responseMode:t.responseMode,scopes:t.scopes,state:t.state,nonce:t.nonce,ignoreSignature:t.ignoreSignature};return!1===t.pkce?n:Object.assign(Object.assign({},n),{codeVerifier:t.codeVerifier,codeChallengeMethod:t.codeChallengeMethod,codeChallenge:t.codeChallenge})};var r=n(588)},6973:function(e,t,n){"use strict";t.default=void 0;var r=n(5637),o=n(3754);function a(e){return("0"+e.toString(16)).substr(-2)}var i={DEFAULT_CODE_CHALLENGE_METHOD:o.DEFAULT_CODE_CHALLENGE_METHOD,generateVerifier:function(e){var t,n,i=e||"";return i.length<o.MIN_VERIFIER_LENGTH&&(i+=(t=o.MIN_VERIFIER_LENGTH-i.length,n=new Uint8Array(Math.ceil(t/2)),r.webcrypto.getRandomValues(n),Array.from(n,a).join("").slice(0,t))),encodeURIComponent(i).slice(0,o.MAX_VERIFIER_LENGTH)},computeChallenge:function(e){var t=(new TextEncoder).encode(e);return r.webcrypto.subtle.digest("SHA-256",t).then((function(e){var t=String.fromCharCode.apply(null,new Uint8Array(e));return(0,r.stringToBase64Url)(t)}))}};t.default=i,e.exports=t.default},3584:function(e,t,n){"use strict";var r=n(5318);t.assertPKCESupport=f,t.validateCodeChallengeMethod=d,t.preparePKCE=h,t.prepareTokenParams=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(this,void 0,void 0,o.default.mark((function n(){var r;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=(0,u.getDefaultTokenParams)(e),!1!==(t=Object.assign(Object.assign({},r),t)).pkce){n.next=4;break}return n.abrupt("return",t);case 4:return n.abrupt("return",h(e,t));case 5:case"end":return n.stop()}}),n)})))};var o=r(n(7757)),a=n(6308),i=n(5705),u=n(6588),s=n(3754),c=r(n(6973)),l=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))};function f(e){if(!e.features.isPKCESupported()){var t="PKCE requires a modern browser with encryption support running in a secure context.";throw e.features.isHTTPS()||(t+="\nThe current page is not being served with HTTPS protocol. PKCE requires secure HTTPS protocol."),e.features.hasTextEncoder()||(t+='\n"TextEncoder" is not defined. To use PKCE, you may need to include a polyfill/shim for this browser.'),new i.AuthSdkError(t)}}function d(e,t){return l(this,void 0,void 0,o.default.mark((function n(){return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=t||e.options.codeChallengeMethod||s.DEFAULT_CODE_CHALLENGE_METHOD,n.next=3,(0,a.getWellKnown)(e);case 3:if(-1!==(n.sent.code_challenge_methods_supported||[]).indexOf(t)){n.next=7;break}throw new i.AuthSdkError("Invalid code_challenge_method");case 7:return n.abrupt("return",t);case 8:case"end":return n.stop()}}),n)})))}function h(e,t){return l(this,void 0,void 0,o.default.mark((function n(){var r,a,i,u;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=(r=t).codeVerifier,i=r.codeChallenge,u=r.codeChallengeMethod,i=i||e.options.codeChallenge){n.next=8;break}return f(e),a=a||c.default.generateVerifier(),n.next=7,c.default.computeChallenge(a);case 7:i=n.sent;case 8:return n.next=10,d(e,u);case 10:return u=n.sent,t=Object.assign(Object.assign({},t),{responseType:"code",codeVerifier:a,codeChallenge:i,codeChallengeMethod:u}),n.abrupt("return",t);case 13:case"end":return n.stop()}}),n)})))}},9849:function(e,t,n){"use strict";t.isSameRefreshToken=function(e,t){return e.refreshToken===t.refreshToken},t.isRefreshTokenError=function(e){return!!(0,r.isAuthApiError)(e)&&(!(!e.xhr||!e.xhr.responseJSON)&&"invalid_grant"===e.xhr.responseJSON.error)};var r=n(5705)},7724:function(e,t){"use strict";t.urlParamsToObject=function(e){var t=/\+/g,n=/([^&=]+)=?([^&]*)/g,r=e||"";"#"===r.charAt(0)&&"/"===r.charAt(1)&&(r=r.substring(2)),"#"!==r.charAt(0)&&"?"!==r.charAt(0)||(r=r.substring(1));for(var o,a={};o=n.exec(r);){var i=o[1],u=o[2];a[i]="id_token"===i||"access_token"===i||"code"===i?u:decodeURIComponent(u.replace(t," "))}return a}},3385:function(e,t,n){"use strict";var r=n(5318);t.validateClaims=function(e,t,n){var r=n.clientId,a=n.issuer,i=n.nonce;if(!t||!a||!r)throw new o.default("The jwt, iss, and aud arguments are all required");if(i&&t.nonce!==i)throw new o.default("OAuth flow response nonce doesn't match request nonce");var u=Math.floor(Date.now()/1e3);if(t.iss!==a)throw new o.default("The issuer ["+t.iss+"] does not match ["+a+"]");if(t.aud!==r)throw new o.default("The audience ["+t.aud+"] does not match ["+r+"]");if(t.iat>t.exp)throw new o.default("The JWT expired before it was issued");if(!e.options.ignoreLifetime){if(u-e.options.maxClockSkew>t.exp)throw new o.default("The JWT expired and is no longer valid");if(t.iat>u+e.options.maxClockSkew)throw new o.default("The JWT was issued in the future")}};var o=r(n(7948))},8031:function(e,t,n){"use strict";t.validateToken=function(e,t){if(!(0,o.isIDToken)(e)&&!(0,o.isAccessToken)(e)&&!(0,o.isRefreshToken)(e))throw new r.AuthSdkError("Token must be an Object with scopes, expiresAt, and one of: an idToken, accessToken, or refreshToken property");if("accessToken"===t&&!(0,o.isAccessToken)(e))throw new r.AuthSdkError("invalid accessToken");if("idToken"===t&&!(0,o.isIDToken)(e))throw new r.AuthSdkError("invalid idToken");if("refreshToken"===t&&!(0,o.isRefreshToken)(e))throw new r.AuthSdkError("invalid refreshToken")};var r=n(5705),o=n(858)},805:function(e,t,n){"use strict";var r=n(5318),o=n(8);t.verifyToken=function(e,t,n){return d(this,void 0,void 0,a.default.mark((function r(){var o,f,d,h,p,v;return a.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t&&t.idToken){r.next=2;break}throw new s.AuthSdkError("Only idTokens may be verified");case 2:return o=(0,c.decodeToken)(t.idToken),f=(null==n?void 0:n.issuer)||e.options.issuer,r.next=6,(0,i.getWellKnown)(e,f);case 6:if(d=r.sent,h=d.issuer,p=Object.assign({clientId:e.options.clientId,ignoreSignature:e.options.ignoreSignature},n,{issuer:h}),(0,u.validateClaims)(e,o.payload,p),1!=p.ignoreSignature&&e.features.isTokenVerifySupported()){r.next=12;break}return r.abrupt("return",t);case 12:return r.next=14,(0,i.getKey)(e,t.issuer,o.header.kid);case 14:return v=r.sent,r.next=17,l.verifyToken(t.idToken,v);case 17:if(r.sent){r.next=20;break}throw new s.AuthSdkError("The token signature is not valid");case 20:if(!(n&&n.accessToken&&t.claims.at_hash)){r.next=26;break}return r.next=23,l.getOidcHash(n.accessToken);case 23:if(r.sent===t.claims.at_hash){r.next=26;break}throw new s.AuthSdkError("Token hash verification failed");case 26:return r.abrupt("return",t);case 27:case"end":return r.stop()}}),r)})))};var a=r(n(7757)),i=n(6308),u=n(4736),s=n(5705),c=n(1964),l=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var u=a?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(5637));function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}var d=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(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(i,u)}s((r=r.apply(e,t||[])).next())}))}},6539:function(e,t,n){"use strict";var r=n(5318);t.getStorage=function(){return Object.assign({},a.default,{inMemoryStore:{}})},t.getCookieSettings=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e.cookies||{};return void 0===n.secure&&(n.secure=t),void 0===n.sameSite&&(n.sameSite=n.secure?"none":"lax"),n.secure&&!t&&((0,o.warn)('The current page is not being served with the HTTPS protocol.\nFor security reasons, we strongly recommend using HTTPS.\nIf you cannot use HTTPS, set "cookies.secure" option to false.'),n.secure=!1),"none"!==n.sameSite||n.secure||(n.sameSite="lax"),n},t.enableSharedStorage=t.STORAGE_MANAGER_OPTIONS=void 0;var o=n(8965),a=r(n(7501));t.STORAGE_MANAGER_OPTIONS={token:{storageTypes:["localStorage","sessionStorage","cookie"]},cache:{storageTypes:["localStorage","sessionStorage","cookie"]},transaction:{storageTypes:["sessionStorage","localStorage","cookie"]},"shared-transaction":{storageTypes:["localStorage"]},"original-uri":{storageTypes:["localStorage"]}},t.enableSharedStorage=!0},9856:function(e,t,n){"use strict";var r=n(5318);t.getDefaultOptions=c,t.buildOptions=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.assertValidConfig)(e),e=l(c(),e),(0,o.removeNils)({issuer:(0,o.removeTrailingSlash)(e.issuer),tokenUrl:(0,o.removeTrailingSlash)(e.tokenUrl),authorizeUrl:(0,o.removeTrailingSlash)(e.authorizeUrl),userinfoUrl:(0,o.removeTrailingSlash)(e.userinfoUrl),revokeUrl:(0,o.removeTrailingSlash)(e.revokeUrl),logoutUrl:(0,o.removeTrailingSlash)(e.logoutUrl),clientId:e.clientId,redirectUri:e.redirectUri,state:e.state,scopes:e.scopes,postLogoutRedirectUri:e.postLogoutRedirectUri,responseMode:e.responseMode,responseType:e.responseType,pkce:!1!==e.pkce,useInteractionCodeFlow:e.useInteractionCodeFlow,httpRequestClient:e.httpRequestClient,transformErrorXHR:e.transformErrorXHR,transformAuthState:e.transformAuthState,restoreOriginalUri:e.restoreOriginalUri,storageUtil:e.storageUtil,headers:e.headers,devMode:!!e.devMode,storageManager:e.storageManager,transactionManager:e.transactionManager,cookies:(0,u.getCookieSettings)(e,(0,s.isHTTPS)()),flow:e.flow,codeChallenge:e.codeChallenge,codeChallengeMethod:e.codeChallengeMethod,recoveryToken:e.recoveryToken,activationToken:e.activationToken,ignoreSignature:!!e.ignoreSignature,clientSecret:e.clientSecret})};var o=n(8965),a=n(6862),i=r(n(4888)),u=n(6539),s=n(9426);function c(){return{devMode:!1,httpRequestClient:i.default,storageUtil:(0,u.getStorage)(),storageManager:u.STORAGE_MANAGER_OPTIONS,transactionManager:{enableSharedStorage:u.enableSharedStorage}}}function l(e,t){return Object.assign({},e,(0,o.removeNils)(t),{storageManager:Object.assign({},e.storageManager,t.storageManager),transactionManager:Object.assign({},e.transactionManager,t.transactionManager)})}},5265:function(e,t,n){"use strict";var r=n(5318);t.AutoRenewService=void 0;var o=r(n(4575)),a=r(n(3913)),i=n(2231),u=n(5705),s=n(9426),c=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(this,e),this.started=!1,this.tokenManager=t,this.options=n,this.renewTimeQueue=[],this.onTokenExpiredHandler=this.onTokenExpiredHandler.bind(this)}return(0,a.default)(e,[{key:"shouldThrottleRenew",value:function(){var e=!1;if(this.renewTimeQueue.push(Date.now()),this.renewTimeQueue.length>=10){var t=this.renewTimeQueue.shift();e=this.renewTimeQueue[this.renewTimeQueue.length-1]-t<3e4}return e}},{key:"requiresLeadership",value:function(){return!!this.options.syncStorage&&(0,s.isBrowser)()}},{key:"onTokenExpiredHandler",value:function(e){if(this.options.autoRenew)if(this.shouldThrottleRenew()){var t=new u.AuthSdkError("Too many token renew requests");this.tokenManager.emitError(t)}else this.tokenManager.renew(e).catch((function(){}));else this.options.autoRemove&&this.tokenManager.remove(e)}},{key:"canStart",value:function(){return!!this.options.autoRenew||!!this.options.autoRemove}},{key:"start",value:function(){this.canStart()&&(this.stop(),this.tokenManager.on(i.EVENT_EXPIRED,this.onTokenExpiredHandler),this.started=!0)}},{key:"stop",value:function(){this.started&&(this.tokenManager.off(i.EVENT_EXPIRED,this.onTokenExpiredHandler),this.renewTimeQueue=[],this.started=!1)}},{key:"isStarted",value:function(){return this.started}}]),e}();t.AutoRenewService=c},1354:function(e,t,n){"use strict";var r=n(5318);t.SyncStorageService=void 0;var o=r(n(4575)),a=r(n(3913)),i=n(9426),u=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(this,e),this.started=!1,this.tokenManager=t,this.options=n,this.storageListener=this.storageListener.bind(this)}return(0,a.default)(e,[{key:"storageListener",value:function(e){var t=this,n=e.key,r=e.newValue,o=e.oldValue,a=this.tokenManager.getOptions();(!n||n===a.storageKey&&r!==o)&&(this.syncTimeout=setTimeout((function(){return t.tokenManager.resetExpireEventTimeoutAll(),void t.tokenManager.emitEventsForCrossTabsStorageUpdate(r,o)}),a._storageEventDelay))}},{key:"requiresLeadership",value:function(){return!1}},{key:"isStarted",value:function(){return this.started}},{key:"canStart",value:function(){return!!this.options.syncStorage&&(0,i.isBrowser)()}},{key:"start",value:function(){this.canStart()&&(this.stop(),window.addEventListener("storage",this.storageListener),this.started=!0)}},{key:"stop",value:function(){this.started&&(window.removeEventListener("storage",this.storageListener),clearTimeout(this.syncTimeout),this.started=!1)}}]),e}();t.SyncStorageService=u},5139:function(e,t,n){"use strict";var r=n(5265);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(1354);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},3427:function(e,t,n){"use strict";t.sessionExists=function(e){return e.session.get().then((function(e){return"ACTIVE"===e.status})).catch((function(){return!1}))},t.getSession=function(e){return(0,o.get)(e,"/api/v1/sessions/me",{withCredentials:!0}).then((function(t){var n=(0,r.omit)(t,"_links");return n.refresh=function(){return(0,o.post)(e,(0,r.getLink)(t,"refresh").href,{},{withCredentials:!0})},n.user=function(){return(0,o.get)(e,(0,r.getLink)(t,"user").href,{withCredentials:!0})},n})).catch((function(){return{status:"INACTIVE"}}))},t.closeSession=function(e){return(0,o.httpRequest)(e,{url:e.getIssuerOrigin()+"/api/v1/sessions/me",method:"DELETE",withCredentials:!0})},t.refreshSession=function(e){return(0,o.post)(e,"/api/v1/sessions/me/lifecycle/refresh",{},{withCredentials:!0})},t.setCookieAndRedirect=function(e,t,n){n=n||window.location.href,window.location.assign(e.getIssuerOrigin()+"/login/sessionCookieRedirect"+(0,r.toQueryString)({checkAccountSetupComplete:!0,token:t,redirectUrl:n}))};var r=n(8965),o=n(2924)},7742:function(e,t,n){"use strict";var r=n(5318);t.AuthTransaction=void 0;var o=r(n(4575)),a=n(2924),i=n(8965),u=r(n(7948)),s=n(7442),c=n(637),l=n(256);function f(e,t,n,r,o){if(Array.isArray(r))return function(a,s){if(!a)throw new u.default("Must provide a link name");var c=(0,i.find)(r,{name:a});if(!c)throw new u.default("No link found for that name");return f(e,t,n,c,o)(s)};if(r.hints&&r.hints.allow&&1===r.hints.allow.length)switch(r.hints.allow[0]){case"GET":return function(){return(0,a.get)(e,r.href,{withCredentials:!0})};case"POST":return function(a){o&&o.isPolling&&(o.isPolling=!1);var c=(0,s.addStateToken)(t,a);"MFA_ENROLL"!==t.status&&"FACTOR_ENROLL"!==t.status||Object.assign(c,{factorType:n.factorType,provider:n.provider});var f={},d=c.autoPush;if(void 0!==d){if("function"==typeof d)try{f.autoPush=!!d()}catch(e){return Promise.reject(new u.default("AutoPush resulted in an error."))}else null!==d&&(f.autoPush=!!d);c=(0,i.omit)(c,"autoPush")}var h=c.rememberDevice;if(void 0!==h){if("function"==typeof h)try{f.rememberDevice=!!h()}catch(e){return Promise.reject(new u.default("RememberDevice resulted in an error."))}else null!==h&&(f.rememberDevice=!!h);c=(0,i.omit)(c,"rememberDevice")}else c.profile&&void 0!==c.profile.updatePhone&&(c.profile.updatePhone&&(f.updatePhone=!0),c.profile=(0,i.omit)(c.profile,"updatePhone"));var p=r.href+(0,i.toQueryString)(f);return(0,l.postToTransaction)(e,p,c)}}}function d(e,t,n,r){if(n=n||t,n=(0,i.clone)(n),Array.isArray(n)){for(var o=[],a=0,u=n.length;a<u;a++)o.push(d(e,t,n[a],r));return o}var s=n._embedded||{};for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&((0,i.isObject)(s[l])||Array.isArray(s[l]))&&(s[l]=d(e,t,s[l],r));var h=function(e,t,n,r){var o={};for(var a in n._links)if(Object.prototype.hasOwnProperty.call(n._links,a)){var i=n._links[a];if("next"===a&&(a=i.name),i.type)o[a]=i;else if("poll"===a)o.poll=(0,c.getPollFn)(e,t,r);else{var u=f(e,t,n,i,r);u&&(o[a]=u)}}return o}(e,t,n,r);return Object.assign(s,h),n=(0,i.omit)(n,"_embedded","_links"),Object.assign(n,s),n}t.AuthTransaction=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if((0,o.default)(this,e),this.data=void 0,this.status=void 0,n){if(this.data=n,this.data.interactionHandle)return void(this.status=n.status);Object.assign(this,d(t,n,n,{})),delete this.stateToken,"RECOVERY_CHALLENGE"!==n.status||n._links||(this.cancel=function(){return Promise.resolve(new e(t))})}}},4419:function(){},256:function(e,t,n){"use strict";var r=n(5318);t.transactionStatus=function(e,t){return t=(0,u.addStateToken)(e,t),(0,o.post)(e,e.getIssuerOrigin()+"/api/v1/authn",t,{withCredentials:!0})},t.resumeTransaction=function(e,t){if(!t||!t.stateToken){var n=e.tx.exists._get(i.STATE_TOKEN_KEY_NAME);if(!n)return Promise.reject(new a.default("No transaction to resume"));t={stateToken:n}}return e.tx.status(t).then((function(t){return new s.AuthTransaction(e,t)}))},t.introspectAuthn=function(e,t){if(!t||!t.stateToken){var n=e.tx.exists._get(i.STATE_TOKEN_KEY_NAME);if(!n)return Promise.reject(new a.default("No transaction to evaluate"));t={stateToken:n}}return c(e,t).then((function(t){return new s.AuthTransaction(e,t)}))},t.transactionStep=c,t.transactionExists=function(e){return!!e.tx.exists._get(i.STATE_TOKEN_KEY_NAME)},t.postToTransaction=function(e,t,n,r){return r=Object.assign({withCredentials:!0},r),(0,o.post)(e,t,n,r).then((function(t){return new s.AuthTransaction(e,t)}))};var o=n(2924),a=r(n(7948)),i=n(3754),u=n(7442),s=n(7742);function c(e,t){return t=(0,u.addStateToken)(e,t),(0,o.post)(e,e.getIssuerOrigin()+"/api/v1/authn/introspect",t,{withCredentials:!0})}},7847:function(e,t,n){"use strict";var r=n(256);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(7742);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(637);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(4419);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var u=n(7442);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}))},637:function(e,t,n){"use strict";var r=n(5318);t.getPollFn=function(e,t,n){return function(r){var f,d,h,p;(0,a.isNumber)(r)?f=r:(0,a.isObject)(r)&&(f=(r=r).delay,d=r.rememberDevice,h=r.autoPush,p=r.transactionCallBack),f||0===f||(f=i.DEFAULT_POLLING_DELAY);var v=(0,a.getLink)(t,"next","poll");n.isPolling=!0;var g=0;return function r(){return n.isPolling?function(){var n={};if("function"==typeof h)try{n.autoPush=!!h()}catch(e){return Promise.reject(new u.default("AutoPush resulted in an error."))}else null!=h&&(n.autoPush=!!h);if("function"==typeof d)try{n.rememberDevice=!!d()}catch(e){return Promise.reject(new u.default("RememberDevice resulted in an error."))}else null!=d&&(n.rememberDevice=!!d);var r=v.href+(0,a.toQueryString)(n);return(0,o.post)(e,r,(0,l.getStateToken)(t),{saveAuthnState:!1,withCredentials:!0})}().then((function(t){if(g=0,t.factorResult&&"WAITING"===t.factorResult){if(!n.isPolling)throw new s.default;return"function"==typeof p&&p(t),(0,a.delay)(f).then(r)}return n.isPolling=!1,new c.AuthTransaction(e,t)})).catch((function(e){if(e.xhr&&(0===e.xhr.status||429===e.xhr.status)&&g<=4){var t=1e3*Math.pow(2,g);return g++,(0,a.delay)(t).then(r)}throw e})):Promise.reject(new s.default)}().catch((function(e){throw n.isPolling=!1,e}))}};var o=n(2924),a=n(8965),i=n(3754),u=r(n(7948)),s=r(n(3820)),c=n(7742),l=n(7442)},7442:function(e,t){"use strict";function n(e,t){var n={};return Object.assign(n,t),!n.stateToken&&e.stateToken&&(n.stateToken=e.stateToken),n}t.addStateToken=n,t.getStateToken=function(e){return n(e)}},8930:function(){},1425:function(){},714:function(){},2841:function(){},461:function(){},4119:function(){},6621:function(){},9382:function(){},6220:function(e,t){"use strict";t.isToken=function(e){return!!(e&&(e.accessToken||e.idToken||e.refreshToken)&&Array.isArray(e.scopes))},t.isAccessToken=function(e){return e&&e.accessToken},t.isIDToken=function(e){return e&&e.idToken},t.isRefreshToken=function(e){return e&&e.refreshToken}},6861:function(){},3470:function(e,t,n){"use strict";var r=n(5318);t.isOAuthTransactionMeta=i,t.isPKCETransactionMeta=u,t.isIdxTransactionMeta=function(e){return!!u(e)&&!!e.interactionHandle},t.isCustomAuthTransactionMeta=s,t.isTransactionMeta=function(e){return!(!i(e)&&!s(e))};var o=r(n(8));function a(e){return!(!e||"object"!==(0,o.default)(e)||0===Object.values(e).length)}function i(e){return!(!a(e)||!e.redirectUri&&!e.responseType)}function u(e){return!!i(e)&&!!e.codeVerifier}function s(e){return!!a(e)&&void 0===Object.values(e).find((function(e){return"string"!=typeof e}))}},9978:function(){},5566:function(){},5775:function(){},858:function(e,t,n){"use strict";var r=n(5566);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(8930);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(714);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(3470);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var u=n(1425);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var s=n(5775);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var c=n(6473);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=n(2841);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var f=n(461);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var d=n(4119);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var h=n(9382);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=n(6220);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var v=n(6861);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===v[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}}))}));var g=n(6621);Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var y=n(9978);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===y[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}}))}))},151:function(e,t){"use strict";function n(){return"undefined"!=typeof window?window.console:"undefined"!=typeof console?console:void 0}function r(){var e=n();return e&&e.log?e:{log:function(){},warn:function(){},group:function(){},groupEnd:function(){}}}function o(e){r().warn("[okta-auth-sdk] DEPRECATION: "+e)}t.getNativeConsole=n,t.getConsole=r,t.warn=function(e){r().warn("[okta-auth-sdk] WARN: "+e)},t.deprecate=o,t.deprecateWrap=function(e,t){return function(){return o(e),t.apply(null,arguments)}}},8965:function(e,t,n){"use strict";var r=n(151);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=n(1466);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(9423);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=n(2645);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var u=n(8562);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}))},1466:function(e,t){"use strict";t.isoToUTCString=function(e){var t=e.match(/\d+/g),n=Date.UTC(t[0],t[1]-1,t[2],t[3],t[4],t[5]);return new Date(n).toUTCString()},t.genRandomString=function(e){for(var t="abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",n="",r=0,o=t.length;r<e;++r)n+=t[Math.floor(Math.random()*o)];return n},t.delay=function(e){return new Promise((function(t){setTimeout(t,e)}))}},9423:function(e,t){"use strict";function n(e){if(e){var t=JSON.stringify(e);if(t)return JSON.parse(t)}return e}t.bind=function(e,t){var n=Array.prototype.slice.call(arguments,2);return function(){var r=Array.prototype.slice.call(arguments);return r=n.concat(r),e.apply(t,r)}},t.extend=function(){var e=arguments[0],t=[].slice.call(arguments,1);return t.forEach((function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&void 0!==t[n]&&(e[n]=t[n])})),e},t.removeNils=function(e){var t={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];null!=r&&(t[n]=r)}return t},t.clone=n,t.omit=function(e){for(var t={},r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1==o.indexOf(i)&&(t[i]=e[i]);return n(t)},t.find=function(e,t){for(var n=e.length;n--;){var r=e[n],o=!0;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&r[a]!==t[a]){o=!1;break}if(o)return r}},t.getLink=function(e,t,r){if(e&&e._links){var o=n(e._links[t]);return o&&o.name&&r?o.name===r?o:void 0:o}}},2051:function(e,t,n){"use strict";t.pruneSharedStorage=function(e){var t=e.getSharedTansactionStorage(),n=t.getStorage();Object.keys(n).forEach((function(e){var t=n[e];Date.now()-t.dateCreated>18e5&&delete n[e]})),t.setStorage(n)},t.saveTransactionToSharedStorage=function(e,t,n){var r=e.getSharedTansactionStorage(),o=r.getStorage();o[t]={dateCreated:Date.now(),transaction:n},r.setStorage(o)},t.loadTransactionFromSharedStorage=function(e,t){var n=e.getSharedTansactionStorage().getStorage()[t];return n&&n.transaction&&(0,r.isTransactionMeta)(n.transaction)?n.transaction:null},t.clearTransactionFromSharedStorage=function(e,t){var n=e.getSharedTansactionStorage(),r=n.getStorage();delete r[t],n.setStorage(r)};var r=n(858)},2645:function(e,t){"use strict";t.isString=function(e){return"[object String]"===Object.prototype.toString.call(e)},t.isObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)},t.isNumber=function(e){return"[object Number]"===Object.prototype.toString.call(e)},t.isFunction=function(e){return!!e&&"[object Function]"==={}.toString.call(e)},t.isPromise=function(e){return e&&e.finally&&"function"==typeof e.finally}},8562:function(e,t){"use strict";function n(e){return/^(?:[a-z]+:)?\/\//i.test(e)}function r(e){if(e){var t=e.replace(/^\s+|\s+$/gm,"");return t.replace(/\/+$/,"")}}t.isAbsoluteUrl=n,t.toAbsoluteUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return n(e)?e:(t=r(t),"/"===e[0]?"".concat(t).concat(e):"".concat(t,"/").concat(e))},t.toRelativeUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return n(e)&&(e=e.substring(t.length)),"/"===e[0]?e:"/".concat(e)},t.toQueryString=function(e){var t=[];if(null!==e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&null!==e[n]&&t.push(n+"="+encodeURIComponent(e[n]));return t.length?"?"+t.join("&"):""},t.removeTrailingSlash=r},8991:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OPEN_BROADCAST_CHANNELS=t.BroadcastChannel=void 0,t.clearNodeFolder=function(e){e=(0,a.fillOptionsWithDefaults)(e);var t=(0,o.chooseMethod)(e);return"node"===t.type?t.clearNodeFolder().then((function(){return!0})):r.PROMISE_RESOLVED_FALSE},t.enforceOptions=function(e){u=e};var r=n(6202),o=n(4632),a=n(423),i=new Set;t.OPEN_BROADCAST_CHANNELS=i;var u,s=0,c=function(e,t){var n,c;this.id=s++,i.add(this),this.name=e,u&&(t=u),this.options=(0,a.fillOptionsWithDefaults)(t),this.method=(0,o.chooseMethod)(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,c=(n=this).method.create(n.name,n.options),(0,r.isPromise)(c)?(n._prepP=c,c.then((function(e){n._state=e}))):n._state=c};function l(e,t,n){var o={time:e.method.microSeconds(),type:t,data:n};return(e._prepP?e._prepP:r.PROMISE_RESOLVED_VOID).then((function(){var t=e.method.postMessage(e._state,o);return e._uMP.add(t),t.catch().then((function(){return e._uMP.delete(t)})),t}))}function f(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function d(e,t,n){e._addEL[t].push(n),function(e){if(!e._iL&&f(e)){var t=function(t){e._addEL[t.type].forEach((function(e){var n=e.time-1e5;t.time>=n&&e.fn(t.data)}))},n=e.method.microSeconds();e._prepP?e._prepP.then((function(){e._iL=!0,e.method.onMessage(e._state,t,n)})):(e._iL=!0,e.method.onMessage(e._state,t,n))}}(e)}function h(e,t,n){e._addEL[t]=e._addEL[t].filter((function(e){return e!==n})),function(e){if(e._iL&&!f(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}(e)}t.BroadcastChannel=c,c._pubkey=!0,c.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return l(this,"message",e)},postInternal:function(e){return l(this,"internal",e)},set onmessage(e){var t={time:this.method.microSeconds(),fn:e};h(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,d(this,"message",t)):this._onML=null},addEventListener:function(e,t){d(this,e,{time:this.method.microSeconds(),fn:t})},removeEventListener:function(e,t){h(this,e,this._addEL[e].find((function(e){return e.fn===t})))},close:function(){var e=this;if(!this.closed){i.delete(this),this.closed=!0;var t=this._prepP?this._prepP:r.PROMISE_RESOLVED_VOID;return this._onML=null,this._addEL.message=[],t.then((function(){return Promise.all(Array.from(e._uMP))})).then((function(){return Promise.all(e._befC.map((function(e){return e()})))})).then((function(){return e.method.close(e._state)}))}},get type(){return this.method.type},get isClosed(){return this.closed}}},8437:function(e,t,n){"use strict";var r=n(5585);e.exports={BroadcastChannel:r.BroadcastChannel,createLeaderElection:r.createLeaderElection,clearNodeFolder:r.clearNodeFolder,enforceOptions:r.enforceOptions,beLeader:r.beLeader}},5585:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BroadcastChannel",{enumerable:!0,get:function(){return r.BroadcastChannel}}),Object.defineProperty(t,"OPEN_BROADCAST_CHANNELS",{enumerable:!0,get:function(){return r.OPEN_BROADCAST_CHANNELS}}),Object.defineProperty(t,"beLeader",{enumerable:!0,get:function(){return o.beLeader}}),Object.defineProperty(t,"clearNodeFolder",{enumerable:!0,get:function(){return r.clearNodeFolder}}),Object.defineProperty(t,"createLeaderElection",{enumerable:!0,get:function(){return o.createLeaderElection}}),Object.defineProperty(t,"enforceOptions",{enumerable:!0,get:function(){return r.enforceOptions}});var r=n(8991),o=n(6550)},6550:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.beLeader=u,t.createLeaderElection=function(e,t){if(e._leaderElector)throw new Error("BroadcastChannel already has a leader-elector");t=function(e,t){return e||(e={}),(e=JSON.parse(JSON.stringify(e))).fallbackInterval||(e.fallbackInterval=3e3),e.responseTime||(e.responseTime=t.method.averageResponseTime(t.options)),e}(t,e);var n=new a(e,t);return e._befC.push((function(){return n.die()})),e._leaderElector=n,n};var r=n(6202),o=n(2499),a=function(e,t){var n=this;this.broadcastChannel=e,this._options=t,this.isLeader=!1,this.hasLeader=!1,this.isDead=!1,this.token=(0,r.randomToken)(),this._aplQ=r.PROMISE_RESOLVED_VOID,this._aplQC=0,this._unl=[],this._lstns=[],this._dpL=function(){},this._dpLC=!1;var o=function(e){"leader"===e.context&&("death"===e.action&&(n.hasLeader=!1),"tell"===e.action&&(n.hasLeader=!0))};this.broadcastChannel.addEventListener("internal",o),this._lstns.push(o)};function i(e,t){var n={context:"leader",action:t,token:e.token};return e.broadcastChannel.postInternal(n)}function u(e){e.isLeader=!0,e.hasLeader=!0;var t=(0,o.add)((function(){return e.die()}));e._unl.push(t);var n=function(t){"leader"===t.context&&"apply"===t.action&&i(e,"tell"),"leader"!==t.context||"tell"!==t.action||e._dpLC||(e._dpLC=!0,e._dpL(),i(e,"tell"))};return e.broadcastChannel.addEventListener("internal",n),e._lstns.push(n),i(e,"tell")}a.prototype={applyOnce:function(e){var t=this;return this.isLeader?(0,r.sleep)(0,!0):this.isDead?(0,r.sleep)(0,!1):this._aplQC>1?this._aplQ:(this._aplQC=this._aplQC+1,this._aplQ=this._aplQ.then((function(){return function(){if(t.isLeader)return r.PROMISE_RESOLVED_TRUE;var n,o=!1,a=new Promise((function(e){n=function(){o=!0,e()}})),s=[],c=function(e){"leader"===e.context&&e.token!=t.token&&(s.push(e),"apply"===e.action&&e.token>t.token&&n(),"tell"===e.action&&(n(),t.hasLeader=!0))};t.broadcastChannel.addEventListener("internal",c);var l=e?4*t._options.responseTime:t._options.responseTime;return i(t,"apply").then((function(){return Promise.race([(0,r.sleep)(l),a.then((function(){return Promise.reject(new Error)}))])})).then((function(){return i(t,"apply")})).then((function(){return Promise.race([(0,r.sleep)(l),a.then((function(){return Promise.reject(new Error)}))])})).catch((function(){})).then((function(){return t.broadcastChannel.removeEventListener("internal",c),!o&&u(t).then((function(){return!0}))}))}()})).then((function(){t._aplQC=t._aplQC-1})),this._aplQ.then((function(){return t.isLeader})))},awaitLeadership:function(){return this._aLP||(this._aLP=(e=this).isLeader?r.PROMISE_RESOLVED_VOID:new Promise((function(t){var n=!1;function o(){n||(n=!0,e.broadcastChannel.removeEventListener("internal",a),t(!0))}e.applyOnce().then((function(){e.isLeader&&o()})),function t(){return(0,r.sleep)(e._options.fallbackInterval).then((function(){if(!e.isDead&&!n)return e.isLeader?void o():e.applyOnce(!0).then((function(){e.isLeader?o():t()}))}))}();var a=function(t){"leader"===t.context&&"death"===t.action&&(e.hasLeader=!1,e.applyOnce().then((function(){e.isLeader&&o()})))};e.broadcastChannel.addEventListener("internal",a),e._lstns.push(a)}))),this._aLP;var e},set onduplicate(e){this._dpL=e},die:function(){var e=this;return this._lstns.forEach((function(t){return e.broadcastChannel.removeEventListener("internal",t)})),this._lstns=[],this._unl.forEach((function(e){return e.remove()})),this._unl=[],this.isLeader&&(this.hasLeader=!1,this.isLeader=!1),this.isDead=!0,i(this,"death")}}},4632:function(e,t,n){"use strict";var r=n(8330);n(1909),Object.defineProperty(t,"__esModule",{value:!0}),t.chooseMethod=function(e){var t=[].concat(e.methods,c).filter(Boolean);if(e.type){if("simulate"===e.type)return u.default;var n=t.find((function(t){return t.type===e.type}));if(n)return n;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||s.isNode||(t=t.filter((function(e){return"idb"!==e.type})));var r=t.find((function(e){return e.canBeUsed()}));if(r)return r;throw new Error("No useable method found in "+JSON.stringify(c.map((function(e){return e.type}))))};var o=r(n(6115)),a=r(n(9122)),i=r(n(4924)),u=r(n(1574)),s=n(6202),c=[o.default,a.default,i.default]},9122:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.averageResponseTime=O,t.canBeUsed=w,t.cleanOldMessages=p,t.close=m,t.create=v,t.createDatabase=c,t.default=void 0,t.getAllMessages=function(e){var t=e.transaction(u).objectStore(u),n=[];return new Promise((function(e){t.openCursor().onsuccess=function(t){var r=t.target.result;r?(n.push(r.value),r.continue()):e(n)}}))},t.getIdb=s,t.getMessagesHigherThan=f,t.getOldMessages=h,t.microSeconds=void 0,t.onMessage=k,t.postMessage=b,t.removeMessageById=d,t.type=void 0,t.writeMessage=l;var r=n(6202),o=n(2151),a=n(423),i=r.microSeconds;t.microSeconds=i;var u="messages";function s(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function c(e){var t="pubkey.broadcast-channel-0-"+e,n=s().open(t,1);return n.onupgradeneeded=function(e){e.target.result.createObjectStore(u,{keyPath:"id",autoIncrement:!0})},new Promise((function(e,t){n.onerror=function(e){return t(e)},n.onsuccess=function(){e(n.result)}}))}function l(e,t,n){var r={uuid:t,time:(new Date).getTime(),data:n},o=e.transaction([u],"readwrite");return new Promise((function(e,t){o.oncomplete=function(){return e()},o.onerror=function(e){return t(e)},o.objectStore(u).add(r)}))}function f(e,t){var n=e.transaction(u).objectStore(u),r=[];return new Promise((function(e){(function(){try{var e=IDBKeyRange.bound(t+1,1/0);return n.openCursor(e)}catch(e){return n.openCursor()}}()).onsuccess=function(n){var o=n.target.result;o?o.value.id<t+1?o.continue(t+1):(r.push(o.value),o.continue()):e(r)}}))}function d(e,t){var n=e.transaction([u],"readwrite").objectStore(u).delete(t);return new Promise((function(e){n.onsuccess=function(){return e()}}))}function h(e,t){var n=(new Date).getTime()-t,r=e.transaction(u).objectStore(u),o=[];return new Promise((function(e){r.openCursor().onsuccess=function(t){var r=t.target.result;if(r){var a=r.value;if(!(a.time<n))return void e(o);o.push(a),r.continue()}else e(o)}}))}function p(e,t){return h(e,t).then((function(t){return Promise.all(t.map((function(t){return d(e,t.id)})))}))}function v(e,t){return t=(0,a.fillOptionsWithDefaults)(t),c(e).then((function(n){var a={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:(0,r.randomToken)(),eMIs:new o.ObliviousSet(2*t.idb.ttl),writeBlockPromise:r.PROMISE_RESOLVED_VOID,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){a.closed=!0,t.idb.onclose&&t.idb.onclose()},g(a),a}))}function g(e){e.closed||y(e).then((function(){return(0,r.sleep)(e.options.idb.fallbackInterval)})).then((function(){return g(e)}))}function y(e){return e.closed?r.PROMISE_RESOLVED_VOID:e.messagesCallback?f(e.db,e.lastCursorId).then((function(t){var n=t.filter((function(e){return!!e})).map((function(t){return t.id>e.lastCursorId&&(e.lastCursorId=t.id),t})).filter((function(t){return function(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}(t,e)})).sort((function(e,t){return e.time-t.time}));return n.forEach((function(t){e.messagesCallback&&(e.eMIs.add(t.id),e.messagesCallback(t.data))})),r.PROMISE_RESOLVED_VOID})):r.PROMISE_RESOLVED_VOID}function m(e){e.closed=!0,e.db.close()}function b(e,t){return e.writeBlockPromise=e.writeBlockPromise.then((function(){return l(e.db,e.uuid,t)})).then((function(){0===(0,r.randomInt)(0,10)&&p(e.db,e.options.idb.ttl)})),e.writeBlockPromise}function k(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,y(e)}function w(){return!r.isNode&&!!s()}function O(e){return 2*e.idb.fallbackInterval}t.type="idb";var S={create:v,close:m,onMessage:k,postMessage:b,canBeUsed:w,type:"idb",averageResponseTime:O,microSeconds:i};t.default=S},4924:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addStorageEventListener=f,t.averageResponseTime=y,t.canBeUsed=g,t.close=p,t.create=h,t.default=void 0,t.getLocalStorage=s,t.microSeconds=void 0,t.onMessage=v,t.postMessage=l,t.removeStorageEventListener=d,t.storageKey=c,t.type=void 0;var r=n(2151),o=n(423),a=n(6202),i=a.microSeconds;t.microSeconds=i;var u="localstorage";function s(){var e;if("undefined"==typeof window)return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch(e){}return e}function c(e){return"pubkey.broadcastChannel-"+e}function l(e,t){return new Promise((function(n){(0,a.sleep)().then((function(){var r=c(e.channelName),o={token:(0,a.randomToken)(),time:(new Date).getTime(),data:t,uuid:e.uuid},i=JSON.stringify(o);s().setItem(r,i);var u=document.createEvent("Event");u.initEvent("storage",!0,!0),u.key=r,u.newValue=i,window.dispatchEvent(u),n()}))}))}function f(e,t){var n=c(e),r=function(e){e.key===n&&t(JSON.parse(e.newValue))};return window.addEventListener("storage",r),r}function d(e){window.removeEventListener("storage",e)}function h(e,t){if(t=(0,o.fillOptionsWithDefaults)(t),!g())throw new Error("BroadcastChannel: localstorage cannot be used");var n=(0,a.randomToken)(),i=new r.ObliviousSet(t.localstorage.removeTimeout),u={channelName:e,uuid:n,eMIs:i};return u.listener=f(e,(function(e){u.messagesCallback&&e.uuid!==n&&e.token&&!i.has(e.token)&&(e.data.time&&e.data.time<u.messagesCallbackTime||(i.add(e.token),u.messagesCallback(e.data)))})),u}function p(e){d(e.listener)}function v(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t}function g(){if(a.isNode)return!1;var e=s();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch(e){return!1}return!0}function y(){var e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")?240:120}t.type=u;var m={create:h,close:p,onMessage:v,postMessage:l,canBeUsed:g,type:u,averageResponseTime:y,microSeconds:i};t.default=m},6115:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.averageResponseTime=f,t.canBeUsed=l,t.close=u,t.create=i,t.microSeconds=t.default=void 0,t.onMessage=c,t.postMessage=s,t.type=void 0;var r=n(6202),o=r.microSeconds;t.microSeconds=o;var a="native";function i(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(e){t.messagesCallback&&t.messagesCallback(e.data)},t}function u(e){e.bc.close(),e.subFns=[]}function s(e,t){try{return e.bc.postMessage(t,!1),r.PROMISE_RESOLVED_VOID}catch(e){return Promise.reject(e)}}function c(e,t){e.messagesCallback=t}function l(){if(r.isNode&&"undefined"==typeof window)return!1;if("function"==typeof BroadcastChannel){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}return!1}function f(){return 150}t.type=a;var d={create:i,close:u,onMessage:c,postMessage:s,canBeUsed:l,type:a,averageResponseTime:f,microSeconds:o};t.default=d},1574:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.averageResponseTime=f,t.canBeUsed=l,t.close=u,t.create=i,t.microSeconds=t.default=void 0,t.onMessage=c,t.postMessage=s,t.type=void 0;var r=n(6202).microSeconds;t.microSeconds=r;var o="simulate";t.type=o;var a=new Set;function i(e){var t={name:e,messagesCallback:null};return a.add(t),t}function u(e){a.delete(e)}function s(e,t){return new Promise((function(n){return setTimeout((function(){Array.from(a).filter((function(t){return t.name===e.name})).filter((function(t){return t!==e})).filter((function(e){return!!e.messagesCallback})).forEach((function(e){return e.messagesCallback(t)})),n()}),5)}))}function c(e,t){e.messagesCallback=t}function l(){return!0}function f(){return 5}var d={create:i,close:u,onMessage:c,postMessage:s,canBeUsed:l,type:o,averageResponseTime:f,microSeconds:r};t.default=d},423:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fillOptionsWithDefaults=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return void 0===t.webWorkerSupport&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=45e3),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&"function"==typeof e.idb.onclose&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=6e4),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=12e4),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),void 0===t.node.useFastPath&&(t.node.useFastPath=!0),t}},6202:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=t.PROMISE_RESOLVED_VOID=t.PROMISE_RESOLVED_TRUE=t.PROMISE_RESOLVED_FALSE=void 0,t.isPromise=function(e){return!(!e||"function"!=typeof e.then)},t.microSeconds=function(){var e=(new Date).getTime();return e===a?1e3*e+ ++i:(a=e,i=0,1e3*e)},t.randomInt=function(e,t){return Math.floor(Math.random()*(t-e+1)+e)},t.randomToken=function(){return Math.random().toString(36).substring(2)},t.sleep=function(e,t){return e||(e=0),new Promise((function(n){return setTimeout((function(){return n(t)}),e)}))};var n=Promise.resolve(!1);t.PROMISE_RESOLVED_FALSE=n;var r=Promise.resolve(!0);t.PROMISE_RESOLVED_TRUE=r;var o=Promise.resolve();t.PROMISE_RESOLVED_VOID=o;var a=0,i=0,u="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0);t.isNode=u},8330:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},1909:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4098:function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,i="ArrayBuffer"in e;if(i)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(e){return e&&u.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function v(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():i&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i&&(ArrayBuffer.prototype.isPrototypeOf(e)||s(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var e,t,n,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=p(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(k)}),this.json=function(){return this.text().then(JSON.parse)},this}d.prototype.append=function(e,t){e=c(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},d.prototype.delete=function(e){delete this.map[c(e)]},d.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},d.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},d.prototype.set=function(e,t){this.map[c(e)]=l(t)},d.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},d.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},d.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},d.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},r&&(d.prototype[Symbol.iterator]=d.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e,t){var n,r,o=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new d(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new d(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),m.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function k(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},y.call(b.prototype),y.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var O=[301,302,303,307,308];w.redirect=function(e,t){if(-1===O.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,n){return new Promise((function(r,a){var i=new b(e,n);if(i.signal&&i.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function s(){u.abort()}u.onload=function(){var e,t,n={status:u.status,statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};n.url="responseURL"in u?u.responseURL:n.headers.get("X-Request-URL");var o="response"in u?u.response:u.responseText;r(new w(o,n))},u.onerror=function(){a(new TypeError("Network request failed"))},u.ontimeout=function(){a(new TypeError("Network request failed"))},u.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},u.open(i.method,i.url,!0),"include"===i.credentials?u.withCredentials=!0:"omit"===i.credentials&&(u.withCredentials=!1),"responseType"in u&&o&&(u.responseType="blob"),i.headers.forEach((function(e,t){u.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",s),u.onreadystatechange=function(){4===u.readyState&&i.signal.removeEventListener("abort",s)}),u.send(void 0===i._bodyInit?null:i._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=d,e.Request=b,e.Response=w),t.Headers=d,t.Request=b,t.Response=w,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},5643:function(e){e.exports=!1},646:function(e){e.exports=function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}return function t(n,r){function o(t,o,a){if("undefined"!=typeof document){"number"==typeof(a=e({},r,a)).expires&&(a.expires=new Date(Date.now()+864e5*a.expires)),a.expires&&(a.expires=a.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var u in a)a[u]&&(i+="; "+u,!0!==a[u]&&(i+="="+a[u].split(";")[0]));return document.cookie=t+"="+n.write(o,t)+i}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],r={},o=0;o<t.length;o++){var a=t[o].split("="),i=a.slice(1).join("=");try{var u=decodeURIComponent(a[0]);if(r[u]=n.read(i,u),e===u)break}catch(e){}}return e?r[e]:r}},remove:function(t,n){o(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()},2151:function(e,t,n){"use strict";n.r(t),n.d(t,{ObliviousSet:function(){return r},removeTooOldValues:function(){return o},now:function(){return a}});var r=function(){function e(e){this.ttl=e,this.set=new Set,this.timeMap=new Map}return e.prototype.has=function(e){return this.set.has(e)},e.prototype.add=function(e){var t=this;this.timeMap.set(e,a()),this.set.add(e),setTimeout((function(){o(t)}),0)},e.prototype.clear=function(){this.set.clear(),this.timeMap.clear()},e}();function o(e){for(var t=a()-e.ttl,n=e.set[Symbol.iterator]();;){var r=n.next().value;if(!r)return;if(!(e.timeMap.get(r)<t))return;e.timeMap.delete(r),e.set.delete(r)}}function a(){return(new Date).getTime()}},5666:function(e){var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),i=new x(r||[]);return a._invoke=function(e,t,n){var r=f;return function(o,a){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw a;return P()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var u=T(i,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var s=l(e,t,n);if("normal"===s.type){if(r=n.done?p:d,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=p,n.method="throw",n.arg=s.arg)}}}(e,n,i),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f="suspendedStart",d="suspendedYield",h="executing",p="completed",v={};function g(){}function y(){}function m(){}var b={};b[a]=function(){return this};var k=Object.getPrototypeOf,w=k&&k(k(R([])));w&&w!==n&&r.call(w,a)&&(b=w);var O=m.prototype=g.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,a,i,u){var s=l(e[o],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,u)}),(function(e){n("throw",e,i,u)})):t.resolve(f).then((function(e){c.value=e,i(c)}),(function(e){return n("throw",e,i,u)}))}u(s.arg)}var o;this._invoke=function(e,r){function a(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(a,a):a()}}function T(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function R(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}return{next:P}}function P(){return{value:t,done:!0}}return y.prototype=O.constructor=m,m.constructor=y,y.displayName=s(m,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,u,"GeneratorFunction")),e.prototype=Object.create(O),e},e.awrap=function(e){return{__await:e}},S(E.prototype),E.prototype[i]=function(){return this},e.AsyncIterator=E,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var i=new E(c(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},S(O),s(O,u,"Generator"),O[a]=function(){return this},O.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=R,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:R(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},4279:function(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var a=0,i=r.length;a<i;a++)r[a].fn!==t&&r[a].fn._!==t&&o.push(r[a]);return o.length?n[e]=o:delete n[e],this}},e.exports=t},2499:function(e,t,n){"use strict";n.r(t),n.d(t,{add:function(){return f},getSize:function(){return p},removeAll:function(){return h},runAll:function(){return d}});var r=n(5643),o=n.n(r),a={add:function(e){if("function"==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope);else{if("function"!=typeof window.addEventListener)return;window.addEventListener("beforeunload",(function(){e()}),!0),window.addEventListener("unload",(function(){e()}),!0)}}},i=n(199),u=n.n(i),s=o()?u():a,c=new Set,l=!1;function f(e){if(l||(l=!0,s.add(d)),"function"!=typeof e)throw new Error("Listener is no function");return c.add(e),{remove:function(){return c.delete(e)},run:function(){return c.delete(e),e()}}}function d(){var e=[];return c.forEach((function(t){e.push(t()),c.delete(t)})),Promise.all(e)}function h(){c.clear()}function p(){return c.size}},199:function(){},5883:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return u=i()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&a(o,n.prototype),o},u.apply(null,arguments)}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,o(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,e)},s(e)}function c(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.r(t),n.d(t,{JSONPath:function(){return y}});var h=Object.prototype.hasOwnProperty;function p(e,t){return(e=e.slice()).push(t),e}function v(e,t){return(t=t.slice()).unshift(e),t}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(u,e);var t,n,r=(t=u,n=i(),function(){var e,r=o(t);if(n){var a=o(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return c(this,e)});function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=r.call(this,'JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)')).avoidNew=!0,t.value=e,t.name="NewError",t}return u}(s(Error));function y(e,t,n,o,a){if(!(this instanceof y))try{return new y(e,t,n,o,a)}catch(e){if(!e.avoidNew)throw e;return e.value}"string"==typeof e&&(a=o,o=n,n=t,t=e,e=null);var i=e&&"object"===r(e);if(e=e||{},this.json=e.json||n,this.path=e.path||t,this.resultType=e.resultType||"value",this.flatten=e.flatten||!1,this.wrap=!h.call(e,"wrap")||e.wrap,this.sandbox=e.sandbox||{},this.preventEval=e.preventEval||!1,this.parent=e.parent||null,this.parentProperty=e.parentProperty||null,this.callback=e.callback||o||null,this.otherTypeCallback=e.otherTypeCallback||a||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},!1!==e.autostart){var u={path:i?e.path:t};i?"json"in e&&(u.json=e.json):u.json=n;var s=this.evaluate(u);if(!s||"object"!==r(s))throw new g(s);return s}}y.prototype.evaluate=function(e,t,n,o){var a=this,i=this.parent,u=this.parentProperty,s=this.flatten,c=this.wrap;if(this.currResultType=this.resultType,this.currPreventEval=this.preventEval,this.currSandbox=this.sandbox,n=n||this.callback,this.currOtherTypeCallback=o||this.otherTypeCallback,t=t||this.json,(e=e||this.path)&&"object"===r(e)&&!Array.isArray(e)){if(!e.path&&""!==e.path)throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!h.call(e,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');t=e.json,s=h.call(e,"flatten")?e.flatten:s,this.currResultType=h.call(e,"resultType")?e.resultType:this.currResultType,this.currSandbox=h.call(e,"sandbox")?e.sandbox:this.currSandbox,c=h.call(e,"wrap")?e.wrap:c,this.currPreventEval=h.call(e,"preventEval")?e.preventEval:this.currPreventEval,n=h.call(e,"callback")?e.callback:n,this.currOtherTypeCallback=h.call(e,"otherTypeCallback")?e.otherTypeCallback:this.currOtherTypeCallback,i=h.call(e,"parent")?e.parent:i,u=h.call(e,"parentProperty")?e.parentProperty:u,e=e.path}if(i=i||null,u=u||null,Array.isArray(e)&&(e=y.toPathString(e)),(e||""===e)&&t){var l=y.toPathArray(e);"$"===l[0]&&l.length>1&&l.shift(),this._hasParentSelector=null;var f=this._trace(l,t,["$"],i,u,n).filter((function(e){return e&&!e.isParentSelector}));return f.length?c||1!==f.length||f[0].hasArrExpr?f.reduce((function(e,t){var n=a._getPreferredOutput(t);return s&&Array.isArray(n)?e=e.concat(n):e.push(n),e}),[]):this._getPreferredOutput(f[0]):c?[]:void 0}},y.prototype._getPreferredOutput=function(e){var t=this.currResultType;switch(t){case"all":var n=Array.isArray(e.path)?e.path:y.toPathArray(e.path);return e.pointer=y.toPointer(n),e.path="string"==typeof e.path?e.path:y.toPathString(e.path),e;case"value":case"parent":case"parentProperty":return e[t];case"path":return y.toPathString(e[t]);case"pointer":return y.toPointer(e.path);default:throw new TypeError("Unknown result type")}},y.prototype._handleCallback=function(e,t,n){if(t){var r=this._getPreferredOutput(e);e.path="string"==typeof e.path?e.path:y.toPathString(e.path),t(r,n,e)}},y.prototype._trace=function(e,t,n,o,a,i,u,s){var c,l=this;if(!e.length)return c={path:n,value:t,parent:o,parentProperty:a,hasArrExpr:u},this._handleCallback(c,i,"value"),c;var d=e[0],g=e.slice(1),y=[];function m(e){Array.isArray(e)?e.forEach((function(e){y.push(e)})):y.push(e)}if(("string"!=typeof d||s)&&t&&h.call(t,d))m(this._trace(g,t[d],p(n,d),t,d,i,u));else if("*"===d)this._walk(d,g,t,n,o,a,i,(function(e,t,n,r,o,a,i,u){m(l._trace(v(e,n),r,o,a,i,u,!0,!0))}));else if(".."===d)m(this._trace(g,t,n,o,a,i,u)),this._walk(d,g,t,n,o,a,i,(function(e,t,n,o,a,i,u,s){"object"===r(o[e])&&m(l._trace(v(t,n),o[e],p(a,e),o,e,s,!0))}));else{if("^"===d)return this._hasParentSelector=!0,{path:n.slice(0,-1),expr:g,isParentSelector:!0};if("~"===d)return c={path:p(n,d),value:a,parent:o,parentProperty:null},this._handleCallback(c,i,"property"),c;if("$"===d)m(this._trace(g,t,n,null,null,i,u));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(d))m(this._slice(d,g,t,n,o,a,i));else if(0===d.indexOf("?(")){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");this._walk(d,g,t,n,o,a,i,(function(e,t,n,r,o,a,i,u){l._eval(t.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,"$1"),r[e],e,o,a,i)&&m(l._trace(v(e,n),r,o,a,i,u,!0))}))}else if("("===d[0]){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");m(this._trace(v(this._eval(d,t,n[n.length-1],n.slice(0,-1),o,a),g),t,n,o,a,i,u))}else if("@"===d[0]){var b=!1,k=d.slice(1,-2);switch(k){case"scalar":t&&["object","function"].includes(r(t))||(b=!0);break;case"boolean":case"string":case"undefined":case"function":r(t)===k&&(b=!0);break;case"integer":!Number.isFinite(t)||t%1||(b=!0);break;case"number":Number.isFinite(t)&&(b=!0);break;case"nonFinite":"number"!=typeof t||Number.isFinite(t)||(b=!0);break;case"object":t&&r(t)===k&&(b=!0);break;case"array":Array.isArray(t)&&(b=!0);break;case"other":b=this.currOtherTypeCallback(t,n,o,a);break;case"null":null===t&&(b=!0);break;default:throw new TypeError("Unknown value type "+k)}if(b)return c={path:n,value:t,parent:o,parentProperty:a},this._handleCallback(c,i,"value"),c}else if("`"===d[0]&&t&&h.call(t,d.slice(1))){var w=d.slice(1);m(this._trace(g,t[w],p(n,w),t,w,i,u,!0))}else if(d.includes(",")){var O,S=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=f(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){u=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw a}}}}(d.split(","));try{for(S.s();!(O=S.n()).done;){var E=O.value;m(this._trace(v(E,g),t,n,o,a,i,!0))}}catch(e){S.e(e)}finally{S.f()}}else!s&&t&&h.call(t,d)&&m(this._trace(g,t[d],p(n,d),t,d,i,u,!0))}if(this._hasParentSelector)for(var T=0;T<y.length;T++){var _=y[T];if(_&&_.isParentSelector){var A=this._trace(_.expr,t,_.path,o,a,i,u);if(Array.isArray(A)){y[T]=A[0];for(var x=A.length,R=1;R<x;R++)T++,y.splice(T,0,A[R])}else y[T]=A}}return y},y.prototype._walk=function(e,t,n,o,a,i,u,s){if(Array.isArray(n))for(var c=n.length,l=0;l<c;l++)s(l,e,t,n,o,a,i,u);else n&&"object"===r(n)&&Object.keys(n).forEach((function(r){s(r,e,t,n,o,a,i,u)}))},y.prototype._slice=function(e,t,n,r,o,a,i){if(Array.isArray(n)){var u=n.length,s=e.split(":"),c=s[2]&&Number.parseInt(s[2])||1,l=s[0]&&Number.parseInt(s[0])||0,f=s[1]&&Number.parseInt(s[1])||u;l=l<0?Math.max(0,l+u):Math.min(u,l),f=f<0?Math.max(0,f+u):Math.min(u,f);for(var d=[],h=l;h<f;h+=c)this._trace(v(h,t),n,r,o,a,i,!0).forEach((function(e){d.push(e)}));return d}},y.prototype._eval=function(e,t,n,r,o,a){e.includes("@parentProperty")&&(this.currSandbox._$_parentProperty=a,e=e.replace(/@parentProperty/g,"_$_parentProperty")),e.includes("@parent")&&(this.currSandbox._$_parent=o,e=e.replace(/@parent/g,"_$_parent")),e.includes("@property")&&(this.currSandbox._$_property=n,e=e.replace(/@property/g,"_$_property")),e.includes("@path")&&(this.currSandbox._$_path=y.toPathString(r.concat([n])),e=e.replace(/@path/g,"_$_path")),e.includes("@root")&&(this.currSandbox._$_root=this.json,e=e.replace(/@root/g,"_$_root")),/@([\t-\r \)\.\[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])/.test(e)&&(this.currSandbox._$_v=t,e=e.replace(/@([\t-\r \)\.\[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])/g,"_$_v$1"));try{return this.vm.runInNewContext(e,this.currSandbox)}catch(t){throw console.log(t),new Error("jsonPath: "+t.message+": "+e)}},y.cache={},y.toPathString=function(e){for(var t=e,n=t.length,r="$",o=1;o<n;o++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(t[o])||(r+=/^[\*0-9]+$/.test(t[o])?"["+t[o]+"]":"['"+t[o]+"']");return r},y.toPointer=function(e){for(var t=e,n=t.length,r="",o=1;o<n;o++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(t[o])||(r+="/"+t[o].toString().replace(/~/g,"~0").replace(/\//g,"~1"));return r},y.toPathArray=function(e){var t=y.cache;if(t[e])return t[e].concat();var n=[],r=e.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/g,";$&;").replace(/['\[](\??\((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\))['\]]/g,(function(e,t){return"[#"+(n.push(t)-1)+"]"})).replace(/\[["']((?:(?!['\]])[\s\S])*)["']\]/g,(function(e,t){return"['"+t.replace(/\./g,"%@%").replace(/~/g,"%%@@%%")+"']"})).replace(/~/g,";~;").replace(/["']?\.["']?(?!(?:(?!\[)[\s\S])*\])|\[["']?/g,";").replace(/%@%/g,".").replace(/%%@@%%/g,"~").replace(/(?:;)?(\^+)(?:;)?/g,(function(e,t){return";"+t.split("").join(";")+";"})).replace(/;;;|;;/g,";..;").replace(/;$|'?\]|'$/g,"").split(";").map((function(e){var t=e.match(/#([0-9]+)/);return t&&t[1]?n[t[1]]:e}));return t[e]=r,t[e].concat()},y.prototype.vm={runInNewContext:function(e,t){var n=Object.keys(t),r=[];!function(e,n,r){for(var o=e.length,a=0;a<o;a++)i=e[a],"function"==typeof t[i]&&n.push(e.splice(a--,1)[0]);var i}(n,r);var o=n.map((function(e,n){return t[e]})),a=r.reduce((function(e,n){var r=t[n].toString();return/function/.test(r)||(r="function "+r),"var "+n+"="+r+";"+e}),"");/(["'])use strict\1/.test(e=a+e)||n.includes("arguments")||(e="var arguments = undefined;"+e);var i=(e=e.replace(/;[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/,"")).lastIndexOf(";"),s=i>-1?e.slice(0,i+1)+" return "+e.slice(i+1):" return "+e;return u(Function,l(n).concat([s])).apply(void 0,l(o))}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r=n(625);OktaAuth=r}();
3
3
  //# sourceMappingURL=okta-auth-js.min.js.map