{"version":3,"sources":["../webpack/bootstrap","../node_modules/react/index.js","../node_modules/@sentry/core/esm/constants.js","../node_modules/webpack/buildin/harmony-module.js","../node_modules/react-adal/lib/react-adal.js","../node_modules/object-assign/index.js","../node_modules/@sentry/utils/esm/node.js","../node_modules/@sentry/utils/esm/syncpromise.js","../node_modules/@sentry/utils/esm/browser.js","../node_modules/@sentry/utils/esm/env.js","auth.js","../node_modules/react/cjs/react.development.js","../node_modules/react-adal/lib/adal.mod.js","../node_modules/react-adal/lib/adal.js","../node_modules/@sentry/core/esm/hub.js","../node_modules/@sentry/utils/esm/logger.js","../node_modules/@sentry/utils/esm/is.js","../node_modules/@sentry/utils/esm/worldwide.js","../node_modules/@sentry/utils/esm/object.js","../node_modules/@sentry/utils/esm/misc.js","index.jsx","../node_modules/@sentry/core/esm/exports.js","../node_modules/webpack/buildin/global.js","../node_modules/process/browser.js","../node_modules/@sentry/utils/esm/string.js","../node_modules/@sentry/core/esm/session.js","../node_modules/@sentry/utils/esm/time.js","../node_modules/@sentry/core/esm/scope.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","getDefault","getModuleExports","object","property","prototype","hasOwnProperty","p","s","DEFAULT_ENVIRONMENT","originalModule","webpackPolyfill","children","_typeof","obj","iterator","constructor","adalGetToken","runWithAdal","authContext","app","doNotLogin","isSSR","handleWindowCallback","invalidateResourceTokens","window","parent","isCallback","location","hash","resource","config","loginResource","token","getCachedToken","user","getCachedUser","login","adalFetch","resourceInfo","fetch","url","options","then","headers","Authorization","concat","withAdalLogin","AuthenticationContext","_react","_interopRequireDefault","_adal","_defineProperties","target","props","length","descriptor","configurable","writable","_setPrototypeOf","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","Reflect","construct","sham","Proxy","Date","toString","e","_createSuperInternal","result","Super","_getPrototypeOf","NewTarget","this","arguments","apply","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","getPrototypeOf","_defineProperty","redirectMessages","callback","_parseResourceInfo","parseResourceInfo","resourceGuiId","extraQueryParameters","claims","Promise","resolve","reject","acquireToken","message","msg","shouldAcquireNewToken","some","v","indexOf","acquireTokenPopup","acquireTokenRedirect","WrappedComponent","renderLoading","renderError","_React$Component","_inherits","subClass","superClass","TypeError","_temp","_super","_this","_classCallCheck","instance","Constructor","state","mounted","setState","todoSetState","logged","error","safeSetState","console","log","loginError","getLoginError","_createClass","protoProps","staticProps","render","_this$state","createElement","Component","getOwnPropertySymbols","propIsEnumerable","propertyIsEnumerable","toObject","val","shouldUseNative","assign","test1","String","getOwnPropertyNames","test2","fromCharCode","map","join","test3","split","forEach","letter","keys","err","source","from","symbols","to","isNodeEnv","process","dynamicRequire","mod","request","require","States","resolvedSyncPromise","SyncPromise","rejectedSyncPromise","reason","_","executor","__init","__init2","__init3","__init4","_state","PENDING","_handlers","_resolve","_reject","onfulfilled","onrejected","push","_executeHandlers","catch","finally","onfinally","isRejected","_setResult","RESOLVED","REJECTED","_value","cachedHandlers","slice","handler","WINDOW","htmlTreeAsString","elem","currentElem","MAX_TRAVERSE_HEIGHT","out","height","len","separator","sepLength","nextStr","keyAttrs","Array","isArray","maxStringLength","_htmlElementAsString","parentNode","reverse","_oO","el","className","classes","attr","tagName","toLowerCase","keyAttrPairs","filter","keyAttr","getAttribute","keyAttrPair","id","allowedAttrs","getLocationHref","document","href","oO","getDomElement","selector","querySelector","isBrowserBundle","__SENTRY_BROWSER_BUNDLE__","getSDKSource","IS_LOGIN_NOT_REQUIRED","AD_CLIENT_ID","tenant","clientId","cacheLocation","loadFrameTimeout","endpoints","api","guestUserName","getAuthContext","fetchWithAuthHeader","Sentry","getAuthUser","profile","userInfo","username","userName","getAuthToken","logout","logOut","_assign","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","Fragment","StrictMode","Profiler","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","Suspense","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_BLOCK_TYPE","REACT_SERVER_BLOCK_TYPE","REACT_FUNDAMENTAL_TYPE","REACT_DEBUG_TRACING_MODE_TYPE","REACT_LEGACY_HIDDEN_TYPE","for","symbolFor","MAYBE_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","ReactCurrentDispatcher","current","ReactCurrentOwner","ReactDebugCurrentFrame","currentExtraStackFrame","setExtraStackFrame","stack","getCurrentStack","getStackAddendum","impl","ReactSharedInternals","ReactCurrentBatchConfig","transition","IsSomeRendererActing","warn","format","_len","args","_key","printWarning","_len2","_key2","level","argsWithFormat","item","unshift","Function","didWarnStateUpdateForUnmountedComponent","warnNoop","publicInstance","callerName","_constructor","componentName","displayName","warningKey","ReactNoopUpdateQueue","isMounted","enqueueForceUpdate","enqueueReplaceState","completeState","enqueueSetState","partialState","emptyObject","context","updater","refs","freeze","isReactComponent","Error","forceUpdate","deprecatedAPIs","replaceState","defineDeprecationWarning","methodName","info","fnName","ComponentDummy","PureComponent","pureComponentPrototype","getContextName","type","getComponentName","tag","$$typeof","_context","getWrappedName","outerType","innerType","wrapperName","functionName","_render","lazyComponent","payload","_payload","init","_init","x","isPureReactComponent","specialPropKeyWarningShown","specialPropRefWarningShown","didWarnAboutStringRefs","RESERVED_PROPS","ref","__self","__source","hasValidRef","getOwnPropertyDescriptor","isReactWarning","undefined","hasValidKey","defineKeyPropWarningGetter","warnAboutAccessingKey","defineRefPropWarningGetter","warnAboutAccessingRef","warnIfStringRefCannotBeAutoConverted","stateNode","ReactElement","owner","element","_owner","_store","propName","childrenLength","childArray","defaultProps","cloneElement","_self","_source","isValidElement","didWarnAboutMaps","userProvidedKeyEscapeRegex","escapeUserProvidedKey","text","replace","getElementKey","index","escape","escaperLookup","match","mapIntoArray","array","escapedPrefix","nameSoFar","child","invokeCallback","_child","mappedChild","childKey","escapedChildKey","cloneAndReplaceKey","oldElement","newKey","subtreeCount","nextNamePrefix","iteratorFn","iterableChildren","entries","step","ii","next","done","childrenString","mapChildren","func","count","lazyInitializer","_status","thenable","ctor","_result","pending","moduleObject","defaultExport","default","resolved","rejected","isValidElementType","resolveDispatcher","dispatcher","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledDepth","disabledLog","__reactDisabledLog","prefix","ReactCurrentDispatcher$1","describeBuiltInComponentFrame","ownerFn","trim","componentFrameCache","reentry","PossiblyWeakMap","WeakMap","Map","describeNativeComponentFrame","fn","control","frame","previousDispatcher","previousPrepareStackTrace","prepareStackTrace","disableLogs","group","groupCollapsed","groupEnd","defineProperties","Fake","set","sample","sampleLines","controlLines","_frame","reenableLogs","syntheticFrame","describeFunctionComponentFrame","describeUnknownElementTypeFrameInDEV","shouldConstruct","propTypesMisspellWarningShown","loggedTypeFailures","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement","setCurrentlyValidatingElement$1","getDeclarationErrorAddendum","getSourceInfoErrorAddendumForProps","elementProps","getSourceInfoErrorAddendum","fileName","lineNumber","ownerHasKeyUseWarning","validateExplicitKey","parentType","validated","currentComponentErrorInfo","getCurrentComponentErrorInfo","parentName","childOwner","validateChildKeys","node","validatePropTypes","propTypes","checkPropTypes","typeSpecs","values","has","typeSpecName","error$1","ex","PropTypes","getDefaultProps","isReactClassApproved","validateFragmentProps","fragment","createElementWithValidation","validType","typeString","sourceInfo","didWarnAboutDeprecatedCreateFactory","frozenObject","Set","createElement$1","cloneElement$1","cloneElementWithValidation","newElement","createFactory","createFactoryWithValidation","validatedFactory","Children","forEachChildren","forEachFunc","forEachContext","countChildren","toArray","only","onlyChild","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","createContext","defaultValue","calculateChangedBits","_calculateChangedBits","_currentValue","_currentValue2","_threadCount","Provider","Consumer","hasWarnedAboutUsingNestedContextConsumers","hasWarnedAboutUsingConsumerProvider","hasWarnedAboutDisplayNameOnConsumer","_Provider","_currentRenderer","_currentRenderer2","createRef","refObject","seal","forwardRef","ownName","elementType","lazy","lazyType","newDefaultProps","newPropTypes","memo","compare","useCallback","deps","useContext","Context","unstable_observedBits","realContext","useDebugValue","formatterFn","useEffect","useImperativeHandle","useLayoutEffect","useMemo","useReducer","reducer","initialArg","useRef","initialValue","useState","initialState","version","idToken","_getItem","CONSTANTS","STORAGE","IDTOKEN","upn","_extractIdToken","_clearStaleResourceToken","currentUserUpn","resourceToken","clearCacheForResource","_default","_AuthenticationContext","REQUEST_TYPE","LOGIN","RENEW_TOKEN","UNKNOWN","RESPONSE_TYPE","ID_TOKEN_TOKEN","TOKEN","ACCESS_TOKEN","EXPIRES_IN","ID_TOKEN","ERROR_DESCRIPTION","SESSION_STATE","ERROR","TOKEN_KEYS","ACCESS_TOKEN_KEY","EXPIRATION_KEY","STATE_LOGIN","STATE_RENEW","NONCE_IDTOKEN","USERNAME","LOGIN_REQUEST","LOGIN_ERROR","RENEW_STATUS","ANGULAR_LOGIN_REQUEST","RESOURCE_DELIMETER","CACHE_DELIMETER","LOADFRAME_TIMEOUT","TOKEN_RENEW_STATUS_CANCELED","TOKEN_RENEW_STATUS_COMPLETED","TOKEN_RENEW_STATUS_IN_PROGRESS","LOGGING_LEVEL","WARN","INFO","VERBOSE","LEVEL_STRING_MAP","POPUP_WIDTH","POPUP_HEIGHT","_singletonInstance","popUp","isAngular","_user","_activeRenewals","_loginInProgress","_acquireTokenInProgress","_renewStates","_callBackMappedToRenewStates","_callBacksMappedToRenewStates","_openedWindows","_requestType","_adalInstance","displayCall","_cloneConfig","navigateToLoginRequestUrl","redirectUri","postLogoutRedirectUri","anonymousEndpoints","Logging","piiLoggingEnabled","expectedState","_guid","_idTokenNonce","loginStartPage","_saveItem","verbose","urlNavigate","_getNavigateUrl","encodeURIComponent","registerCallback","_loginPopup","promptUser","_openPopup","title","popUpWidth","popUpHeight","winLeft","screenLeft","screenX","winTop","screenTop","screenY","width","innerWidth","documentElement","clientWidth","body","innerHeight","clientHeight","left","top","popupWindow","open","focus","_handlePopupError","loginCallback","errorDesc","registeredRedirectUri","that","pollTimer","setInterval","closed","_broadcast","clearInterval","popUpWindowLocation","encodeURI","close","eventName","data","CustomEvent","event","params","bubbles","cancelable","detail","evt","createEvent","initCustomEvent","Event","dispatchEvent","loginInProgress","_hasResource","_isEmpty","expiry","offset","expireOffsetSeconds","_now","idtoken","_createUser","tokenType","_renewToken","responseType","frameHandle","_addAdalFrame","_urlRemoveQueryStringParameter","_addHintParameters","verbosePii","src","_loadFrameTimeout","_renewIdToken","_urlContainsQueryStringParameter","RegExp","test","regex","urlNavigation","frameName","_loadFrame","setTimeout","frameCheck","extraQueryParameter","infoPii","clearCache","logOutUri","str","getUser","sid","parts","parsedJson","aud","email","_getHash","substring","parameters","_deserialize","getRequestInfo","requestInfo","valid","stateMatch","stateResponse","requestType","_matchState","statesInParentContext","_matchNonce","requestNonce","nonce","loginStates","acquireTokenStates","_getResourceFromState","splitIndex","saveTokenFromHash","error_description","_expiresIn","exp","getResourceForEndpoint","endpoint","configEndpoint","_getHostFromUri","uri","extractedUri","isPopup","opener","tokenReceivedCallback","_serialize","_addLibMetadata","encodedIdToken","decodedToken","_decodeJwt","base64IdToken","JWSPayload","base64Decoded","_base64DecodeStringUrlSafe","JSON","parse","atob","decodeURIComponent","_decode","codes","h1","h2","h3","h4","bits","c1","c2","c3","decoded","charAt","jwtToken","matches","exec","header","JWSSig","_convertUrlSafeToRegularBase64EncodedString","correlationId","query","pl","search","decode","_decimalToHex","number","hex","cryptoObj","crypto","msCrypto","getRandomValues","buffer","Uint8Array","guidHolder","guidResponse","Math","random","expires","parseInt","round","getTime","iframeId","adalFrame","getElementById","opera","navigator","userAgent","ifr","setAttribute","style","visibility","position","borderWidth","getElementsByTagName","appendChild","insertAdjacentHTML","frames","preserve","_supportsLocalStorage","localStorage","setItem","_supportsSessionStorage","sessionStorage","getItem","removeItem","copy","_libVersion","containsPii","timestamp","toUTCString","formattedMessage","errorPii","warnPii","inject","conf","DEFAULT_BREADCRUMBS","Hub","client","scope","_version","_stack","bindClient","isOlderThan","getStackTop","setupIntegrations","pushScope","clone","getScope","getStack","getClient","popScope","pop","withScope","captureException","exception","hint","eventId","_lastEventId","event_id","syntheticException","_withClient","originalException","captureMessage","captureEvent","lastEventId","addBreadcrumb","breadcrumb","beforeBreadcrumb","maxBreadcrumbs","getOptions","mergedBreadcrumb","finalBreadcrumb","emit","setUser","setTags","tags","setExtras","extras","setTag","setExtra","extra","setContext","configureScope","run","oldHub","makeMain","getIntegration","integration","__SENTRY_DEBUG__","startTransaction","customSamplingContext","_callExtensionMethod","traceHeaders","captureSession","endSession","_sendSessionUpdate","session","getSession","setSession","startSession","release","environment","currentSession","status","shouldSendDefaultPii","Boolean","sendDefaultPii","method","sentry","getMainCarrier","__SENTRY__","extensions","hub","registry","getHubFromCarrier","setHubOnCarrier","getCurrentHub","acs","getGlobalHub","hasHubOnCarrier","carrier","CONSOLE_LEVELS","originalConsoleMethods","consoleSandbox","wrappedFuncs","wrappedLevels","originalConsoleMethod","logger","makeLogger","enabled","enable","disable","objectToString","isError","wat","isInstanceOf","isBuiltin","isErrorEvent","isDOMError","isDOMException","isString","isPrimitive","isPlainObject","isEvent","isElement","Element","isRegExp","isThenable","isSyntheticEvent","isNaN","base","_e","isGlobalObj","GLOBAL_OBJ","globalThis","global","getGlobalObject","getGlobalSingleton","creator","gbl","fill","replacementFactory","original","wrapped","markFunctionWrapped","_Oo","addNonEnumerableProperty","proto","getOriginalFunction","__sentry_original__","urlEncode","convertToPlainObject","getOwnProperties","newObj","serializeEventTarget","currentTarget","extractedProps","extractExceptionKeysForMessage","maxLength","sort","includedKeys","serialized","dropUndefinedKeys","inputValue","_dropUndefinedKeys","memoizationMap","memoVal","returnValue","uuid4","randomUUID","getRandomByte","getFirstException","getEventDescription","firstException","addExceptionTypeValue","addExceptionMechanism","newMechanism","currentMechanism","mechanism","handled","mergedData","checkOrSetAlreadyCaught","__sentry_captured__","arrayify","maybeArray","localVersion","sleep","ms","checkVersion","Headers","append","cache","redirect","response","ok","json","versionObj","releaseVersion","confirm","reload","stopChecking","loadApp","captureContext","g","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","runClearTimeout","marker","Item","noop","nextTick","browser","env","argv","versions","on","addListener","once","off","removeListener","removeAllListeners","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","truncate","max","snipLine","line","colno","newLine","lineLength","start","end","min","safeJoin","input","delimiter","output","stringMatchesSomePattern","testString","patterns","requireExactStringMatch","pattern","isMatchingPattern","includes","makeSession","startingTime","started","duration","errors","ignoreDuration","toJSON","sessionToJSON","toISOString","did","attrs","ip_address","ipAddress","user_agent","updateSession","closeSession","dateTimestampSource","nowSeconds","now","platformPerformance","getNodePerformance","performance","getBrowserPerformance","timeOrigin","timestampSource","dateTimestampInSeconds","timestampInSeconds","_browserPerformanceTimeOriginMode","browserPerformanceTimeOrigin","threshold","performanceNow","dateNow","timeOriginDelta","abs","timeOriginIsReliable","navigationStart","timing","navigationStartDelta","Scope","_notifyingListeners","_scopeListeners","_eventProcessors","_breadcrumbs","_attachments","_tags","_extra","_contexts","_sdkProcessingMetadata","_propagationContext","generatePropagationContext","static","newScope","_level","_span","_session","_transactionName","_fingerprint","_requestSession","addScopeListener","addEventProcessor","_notifyScopeListeners","getRequestSession","setRequestSession","requestSession","setFingerprint","fingerprint","setLevel","setTransactionName","setSpan","span","getSpan","getTransaction","transaction","update","updatedScope","contexts","propagationContext","clear","maxCrumbs","getLastBreadcrumb","clearBreadcrumbs","addAttachment","attachment","getAttachments","clearAttachments","applyToEvent","trace","getTraceContext","sdkProcessingMetadata","dynamicSamplingContext","getDynamicSamplingContext","transactionName","_applyFingerprint","breadcrumbs","_notifyEventProcessors","getGlobalEventProcessors","setSDKProcessingMetadata","newData","setPropagationContext","getPropagationContext","processors","processor","final","addGlobalEventProcessor","traceId","spanId"],"mappings":";whBACE,IAAIA,EAAmB,GAGvB,SAASC,oBAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,qBAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,oBAAoBQ,EAAIF,EAGxBN,oBAAoBS,EAAIV,EAGxBC,oBAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,oBAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,oBAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,oBAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,oBAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,oBAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,oBAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRzB,oBAAoB6B,EAAI,SAAS1B,GAChC,IAAIS,EAAST,GAAUA,EAAOqB,WA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C,GAC/BgnC,2BAA2B9gC,KAAKlG,GAGlC,SAASkkC,6BACP,MAAO,CACLuD,QAAS,cACTC,OAAQ,cAAQtd,UAAU","file":"static/js/main.e2bc3434b0c86ed62708.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 622);\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","const DEFAULT_ENVIRONMENT = 'production';\n\nexport { DEFAULT_ENVIRONMENT };\n//# sourceMappingURL=constants.js.map\n","module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.adalGetToken = adalGetToken;\nexports.runWithAdal = runWithAdal;\nexports.adalFetch = adalFetch;\nexports.withAdalLogin = exports.AuthenticationContext = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _adal = _interopRequireDefault(require(\"./adal.mod\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar isSSR = typeof window === 'undefined'; // fake context on SSR\n\nvar AuthenticationContext = isSSR ? function () {} : _adal[\"default\"];\nexports.AuthenticationContext = AuthenticationContext;\nvar redirectMessages = ['AADSTS16002', // old sid - https://github.com/salvoravida/react-adal/issues/46\n'AADSTS50076', // MFA support - https://github.com/salvoravida/react-adal/pull/45\n'AADSTS50079' // MFA support\n];\n\nfunction shouldAcquireNewToken(message) {\n return redirectMessages.some(function (v) {\n return message.indexOf(v) !== -1;\n });\n}\n\nfunction parseResourceInfo(resourceInfo) {\n return typeof resourceInfo === 'string' ? {\n resourceGuiId: resourceInfo\n } : resourceInfo;\n}\n\nfunction adalGetToken(authContext, resourceInfo, callback) {\n var _parseResourceInfo = parseResourceInfo(resourceInfo),\n resourceGuiId = _parseResourceInfo.resourceGuiId,\n extraQueryParameters = _parseResourceInfo.extraQueryParameters,\n claims = _parseResourceInfo.claims;\n\n return new Promise(function (resolve, reject) {\n authContext.acquireToken(resourceGuiId, function (message, token, msg) {\n if (!msg) {\n resolve(token);\n } else if (shouldAcquireNewToken(message)) {\n // Default to redirect for multi-factor authentication\n // but allow using popup if a callback is provided\n if (callback) {\n authContext.acquireTokenPopup(resourceGuiId, extraQueryParameters, claims, callback);\n } else {\n authContext.acquireTokenRedirect(resourceGuiId, extraQueryParameters, claims);\n }\n } else reject({\n message: message,\n msg: msg\n }); // eslint-disable-line\n\n });\n });\n}\n\nfunction runWithAdal(authContext, app, doNotLogin) {\n // SSR support\n if (isSSR) {\n if (doNotLogin) app();\n return;\n } // it must run in iframe too for refreshToken (parsing hash and get token)\n\n\n authContext.handleWindowCallback(); // Clear the resource cache on new login\n // https://github.com/salvoravida/react-adal/issues/68\n\n authContext.invalidateResourceTokens(); // prevent iframe double app !!!\n\n if (window === window.parent) {\n if (!authContext.isCallback(window.location.hash)) {\n // adal sdk assigns clientId if loginResource is not provided\n var resource = authContext.config.loginResource;\n var token = authContext.getCachedToken(resource);\n var user = authContext.getCachedUser();\n\n if (!token || !user) {\n if (doNotLogin) {\n app();\n } else {\n authContext.login();\n }\n } else {\n app();\n }\n }\n }\n}\n\nfunction adalFetch(authContext, resourceInfo, fetch, url, options) {\n return adalGetToken(authContext, resourceInfo).then(function (token) {\n var o = options || {};\n if (!o.headers) o.headers = {};\n o.headers.Authorization = \"Bearer \".concat(token);\n return fetch(url, o);\n });\n} // eslint-disable-next-line\n\n\nvar withAdalLogin = function withAdalLogin(authContext, resourceInfo) {\n // eslint-disable-next-line\n return function (WrappedComponent, renderLoading, renderError) {\n var _temp;\n\n return _temp = /*#__PURE__*/function (_React$Component) {\n _inherits(_temp, _React$Component);\n\n var _super = _createSuper(_temp);\n\n function _temp(props) {\n var _this;\n\n _classCallCheck(this, _temp);\n\n _this = _super.call(this, props);\n\n _defineProperty(_assertThisInitialized(_this), \"safeSetState\", function (state) {\n if (_this.mounted) {\n _this.setState(state);\n } else {\n _this.todoSetState = state;\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"componentDidMount\", function () {\n _this.mounted = true;\n\n if (_this.todoSetState) {\n _this.setState(_this.todoSetState);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"componentWillUnmount\", function () {\n _this.mounted = false;\n });\n\n _this.state = {\n logged: false,\n error: null\n }; // #67 Using react-adal with Server Side Rendering(Next.js)\n\n if (!isSSR) {\n adalGetToken(authContext, resourceInfo).then(function () {\n _this.safeSetState({\n logged: true\n });\n })[\"catch\"](function (error) {\n var msg = error.msg;\n console.log('adalGetToken', error); // eslint-disable-line\n // Avoid the infinite loop when access_denied\n // https://github.com/salvoravida/react-adal/issues/33\n\n var loginError = authContext.getLoginError();\n var loginWasTriedButFailed = loginError !== undefined && loginError !== null && loginError !== '';\n\n if (loginWasTriedButFailed) {\n _this.safeSetState({\n error: loginError\n });\n } else if (msg === 'login required') {\n authContext.login();\n } else {\n _this.safeSetState({\n error: error\n });\n }\n });\n }\n\n return _this;\n }\n\n _createClass(_temp, [{\n key: \"render\",\n value: function render() {\n if (isSSR) return null;\n var _this$state = this.state,\n logged = _this$state.logged,\n error = _this$state.error;\n if (logged) return /*#__PURE__*/_react[\"default\"].createElement(WrappedComponent, this.props);\n if (error) return typeof renderError === 'function' ? renderError(error) : null;\n return typeof renderLoading === 'function' ? renderLoading() : null;\n }\n }]);\n\n return _temp;\n }(_react[\"default\"].Component), _temp;\n };\n};\n\nexports.withAdalLogin = withAdalLogin;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","import { isBrowserBundle } from './env.js';\n\n/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nfunction isNodeEnv() {\n // explicitly check for browser bundles as those can be optimized statically\n // by terser/rollup.\n return (\n !isBrowserBundle() &&\n Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'\n );\n}\n\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\nfunction dynamicRequire(mod, request) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @returns possibly required module\n */\nfunction loadModule(moduleName) {\n let mod;\n\n try {\n mod = dynamicRequire(module, moduleName);\n } catch (e) {\n // no-empty\n }\n\n try {\n const { cwd } = dynamicRequire(module, 'process');\n mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`) ;\n } catch (e) {\n // no-empty\n }\n\n return mod;\n}\n\nexport { dynamicRequire, isNodeEnv, loadModule };\n//# sourceMappingURL=node.js.map\n","import { isThenable } from './is.js';\n\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\n/** SyncPromise internal states */\nvar States; (function (States) {\n /** Pending */\n const PENDING = 0; States[States[\"PENDING\"] = PENDING] = \"PENDING\";\n /** Resolved / OK */\n const RESOLVED = 1; States[States[\"RESOLVED\"] = RESOLVED] = \"RESOLVED\";\n /** Rejected / Error */\n const REJECTED = 2; States[States[\"REJECTED\"] = REJECTED] = \"REJECTED\";\n})(States || (States = {}));\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nfunction resolvedSyncPromise(value) {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nfunction rejectedSyncPromise(reason) {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise {\n\n constructor(\n executor,\n ) {SyncPromise.prototype.__init.call(this);SyncPromise.prototype.__init2.call(this);SyncPromise.prototype.__init3.call(this);SyncPromise.prototype.__init4.call(this);\n this._state = States.PENDING;\n this._handlers = [];\n\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n then(\n onfulfilled,\n onrejected,\n ) {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result );\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n catch(\n onrejected,\n ) {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n finally(onfinally) {\n return new SyncPromise((resolve, reject) => {\n let val;\n let isRejected;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val );\n });\n });\n }\n\n /** JSDoc */\n __init() {this._resolve = (value) => {\n this._setResult(States.RESOLVED, value);\n };}\n\n /** JSDoc */\n __init2() {this._reject = (reason) => {\n this._setResult(States.REJECTED, reason);\n };}\n\n /** JSDoc */\n __init3() {this._setResult = (state, value) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value ).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };}\n\n /** JSDoc */\n __init4() {this._executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](this._value );\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };}\n}\n\nexport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise };\n//# sourceMappingURL=syncpromise.js.map\n","import { isString } from './is.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}\n\nexport { getDomElement, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.js.map\n","/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nfunction isBrowserBundle() {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nfunction getSDKSource() {\n // @ts-ignore \"npm\" is injected by rollup during build process\n return \"npm\";\n}\n\nexport { getSDKSource, isBrowserBundle };\n//# sourceMappingURL=env.js.map\n","import * as Sentry from '@sentry/react';\nimport { AuthenticationContext, adalFetch } from 'react-adal';\n\nexport const IS_LOGIN_NOT_REQUIRED = process.env.REACT_APP_DISABLE_ACTIVE_DIRECTORY_LOGIN === 'true';\nconst AD_CLIENT_ID = process.env.REACT_APP_ACTIVE_DIRECTORY_CLIENT_ID || 'client-id';\nconst AD_TENANT = process.env.REACT_APP_ACTIVE_DIRECTORY_TENANT || 'tenant-name';\n\nconst config = {\n tenant: AD_TENANT,\n clientId: AD_CLIENT_ID,\n cacheLocation: 'sessionStorage',\n loadFrameTimeout: 30000,\n endpoints: {\n api: AD_CLIENT_ID,\n },\n};\n\nconst authContext = new AuthenticationContext(config);\nconst guestUserName = 'Guest User';\n\nexport const getAuthContext = () => authContext;\n\nexport const fetchWithAuthHeader = (url, options) => {\n if (IS_LOGIN_NOT_REQUIRED) {\n return fetch(url, options);\n }\n return adalFetch(authContext, config.endpoints.api, fetch, url, options).catch((error) => {\n Sentry.captureException(error);\n });\n};\n\nexport const getAuthUser = () => {\n if (IS_LOGIN_NOT_REQUIRED) { return { profile: { name: guestUserName } }; }\n const userInfo = authContext.getCachedUser();\n Sentry.setUser({\n username: userInfo ? userInfo.userName : guestUserName,\n });\n\n return userInfo;\n};\n\nexport const getAuthToken = () => authContext.getCachedToken(AD_CLIENT_ID);\n\nexport const logout = () => {\n authContext.logOut();\n Sentry.setUser(null);\n};\n","/** @license React v17.0.2\n * react.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar _assign = require('object-assign');\n\n// TODO: this is special because it gets imported during build.\nvar ReactVersion = '17.0.2';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar REACT_ELEMENT_TYPE = 0xeac7;\nvar REACT_PORTAL_TYPE = 0xeaca;\nexports.Fragment = 0xeacb;\nexports.StrictMode = 0xeacc;\nexports.Profiler = 0xead2;\nvar REACT_PROVIDER_TYPE = 0xeacd;\nvar REACT_CONTEXT_TYPE = 0xeace;\nvar REACT_FORWARD_REF_TYPE = 0xead0;\nexports.Suspense = 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = 0xead8;\nvar REACT_MEMO_TYPE = 0xead3;\nvar REACT_LAZY_TYPE = 0xead4;\nvar REACT_BLOCK_TYPE = 0xead9;\nvar REACT_SERVER_BLOCK_TYPE = 0xeada;\nvar REACT_FUNDAMENTAL_TYPE = 0xead5;\nvar REACT_SCOPE_TYPE = 0xead7;\nvar REACT_OPAQUE_ID_TYPE = 0xeae0;\nvar REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;\nvar REACT_OFFSCREEN_TYPE = 0xeae2;\nvar REACT_LEGACY_HIDDEN_TYPE = 0xeae3;\n\nif (typeof Symbol === 'function' && Symbol.for) {\n var symbolFor = Symbol.for;\n REACT_ELEMENT_TYPE = symbolFor('react.element');\n REACT_PORTAL_TYPE = symbolFor('react.portal');\n exports.Fragment = symbolFor('react.fragment');\n exports.StrictMode = symbolFor('react.strict_mode');\n exports.Profiler = symbolFor('react.profiler');\n REACT_PROVIDER_TYPE = symbolFor('react.provider');\n REACT_CONTEXT_TYPE = symbolFor('react.context');\n REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');\n exports.Suspense = symbolFor('react.suspense');\n REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');\n REACT_MEMO_TYPE = symbolFor('react.memo');\n REACT_LAZY_TYPE = symbolFor('react.lazy');\n REACT_BLOCK_TYPE = symbolFor('react.block');\n REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');\n REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');\n REACT_SCOPE_TYPE = symbolFor('react.scope');\n REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');\n REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');\n REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');\n REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');\n}\n\nvar MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nvar ReactCurrentDispatcher = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nvar ReactCurrentBatchConfig = {\n transition: 0\n};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nvar ReactDebugCurrentFrame = {};\nvar currentExtraStackFrame = null;\nfunction setExtraStackFrame(stack) {\n {\n currentExtraStackFrame = stack;\n }\n}\n\n{\n ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {\n {\n currentExtraStackFrame = stack;\n }\n }; // Stack implementation injected by the current renderer.\n\n\n ReactDebugCurrentFrame.getCurrentStack = null;\n\n ReactDebugCurrentFrame.getStackAddendum = function () {\n var stack = ''; // Add an extra top frame while an element is being validated\n\n if (currentExtraStackFrame) {\n stack += currentExtraStackFrame;\n } // Delegate to the injected renderer-specific implementation\n\n\n var impl = ReactDebugCurrentFrame.getCurrentStack;\n\n if (impl) {\n stack += impl() || '';\n }\n\n return stack;\n };\n}\n\n/**\n * Used by act() to track whether you're inside an act() scope.\n */\nvar IsSomeRendererActing = {\n current: false\n};\n\nvar ReactSharedInternals = {\n ReactCurrentDispatcher: ReactCurrentDispatcher,\n ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n ReactCurrentOwner: ReactCurrentOwner,\n IsSomeRendererActing: IsSomeRendererActing,\n // Used by renderers to avoid bundling object-assign twice in UMD bundles:\n assign: _assign\n};\n\n{\n ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n}\nfunction error(format) {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n }\n\n var argsWithFormat = args.map(function (item) {\n return '' + item;\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + \".\" + callerName;\n\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n\n error(\"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n}\n/**\n * This is the abstract API for an update queue.\n */\n\n\nvar ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nvar emptyObject = {};\n\n{\n Object.freeze(emptyObject);\n}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {\n {\n throw Error( \"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\" );\n }\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n{\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n\n return undefined;\n }\n });\n };\n\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\n_assign(pureComponentPrototype, Component.prototype);\n\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n var refObject = {\n current: null\n };\n\n {\n Object.seal(refObject);\n }\n\n return refObject;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n}\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n}\n\nfunction getComponentName(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case exports.Fragment:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case exports.Profiler:\n return 'Profiler';\n\n case exports.StrictMode:\n return 'StrictMode';\n\n case exports.Suspense:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n return getComponentName(type.type);\n\n case REACT_BLOCK_TYPE:\n return getComponentName(type._render);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentName(init(payload));\n } catch (x) {\n return null;\n }\n }\n }\n }\n\n return null;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {\n var componentName = getComponentName(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = key.replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\nvar didWarnAboutMaps = false;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof element === 'object' && element !== null && element.key != null) {\n // Explicit key\n return escape('' + element.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n var _child = children;\n var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;\n\n if (Array.isArray(mappedChild)) {\n var escapedChildKey = '';\n\n if (childKey != null) {\n escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n }\n\n mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);\n }\n\n array.push(mappedChild);\n }\n\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getElementKey(child, i);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var iterableChildren = children;\n\n {\n // Warn about using Maps as children\n if (iteratorFn === iterableChildren.entries) {\n if (!didWarnAboutMaps) {\n warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n\n var iterator = iteratorFn.call(iterableChildren);\n var step;\n var ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getElementKey(child, ii++);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else if (type === 'object') {\n var childrenString = '' + children;\n\n {\n {\n throw Error( \"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \"). If you meant to render a collection of children, use an array instead.\" );\n }\n }\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n var result = [];\n var count = 0;\n mapIntoArray(children, result, '', '', function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n var n = 0;\n mapChildren(children, function () {\n n++; // Don't return anything\n });\n return n;\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n mapChildren(children, function () {\n forEachFunc.apply(this, arguments); // Don't return anything.\n }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n {\n throw Error( \"React.Children.only expected to receive a single React element child.\" );\n }\n }\n\n return children;\n}\n\nfunction createContext(defaultValue, calculateChangedBits) {\n if (calculateChangedBits === undefined) {\n calculateChangedBits = null;\n } else {\n {\n if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {\n error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);\n }\n }\n }\n\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n _calculateChangedBits: calculateChangedBits,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n var hasWarnedAboutUsingNestedContextConsumers = false;\n var hasWarnedAboutUsingConsumerProvider = false;\n var hasWarnedAboutDisplayNameOnConsumer = false;\n\n {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context,\n _calculateChangedBits: context._calculateChangedBits\n }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n if (!hasWarnedAboutUsingConsumerProvider) {\n hasWarnedAboutUsingConsumerProvider = true;\n\n error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n _threadCount: {\n get: function () {\n return context._threadCount;\n },\n set: function (_threadCount) {\n context._threadCount = _threadCount;\n }\n },\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingNestedContextConsumers) {\n hasWarnedAboutUsingNestedContextConsumers = true;\n\n error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Consumer;\n }\n },\n displayName: {\n get: function () {\n return context.displayName;\n },\n set: function (displayName) {\n if (!hasWarnedAboutDisplayNameOnConsumer) {\n warn('Setting `displayName` on Context.Consumer has no effect. ' + \"You should set it directly on the context with Context.displayName = '%s'.\", displayName);\n\n hasWarnedAboutDisplayNameOnConsumer = true;\n }\n }\n }\n }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n context.Consumer = Consumer;\n }\n\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n\n return context;\n}\n\nvar Uninitialized = -1;\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\n\nfunction lazyInitializer(payload) {\n if (payload._status === Uninitialized) {\n var ctor = payload._result;\n var thenable = ctor(); // Transition to the next state.\n\n var pending = payload;\n pending._status = Pending;\n pending._result = thenable;\n thenable.then(function (moduleObject) {\n if (payload._status === Pending) {\n var defaultExport = moduleObject.default;\n\n {\n if (defaultExport === undefined) {\n error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\", moduleObject);\n }\n } // Transition to the next state.\n\n\n var resolved = payload;\n resolved._status = Resolved;\n resolved._result = defaultExport;\n }\n }, function (error) {\n if (payload._status === Pending) {\n // Transition to the next state.\n var rejected = payload;\n rejected._status = Rejected;\n rejected._result = error;\n }\n });\n }\n\n if (payload._status === Resolved) {\n return payload._result;\n } else {\n throw payload._result;\n }\n}\n\nfunction lazy(ctor) {\n var payload = {\n // We use these fields to store the result.\n _status: -1,\n _result: ctor\n };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: payload,\n _init: lazyInitializer\n };\n\n {\n // In production, this would just set it on the object.\n var defaultProps;\n var propTypes; // $FlowFixMe\n\n Object.defineProperties(lazyType, {\n defaultProps: {\n configurable: true,\n get: function () {\n return defaultProps;\n },\n set: function (newDefaultProps) {\n error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n defaultProps = newDefaultProps; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'defaultProps', {\n enumerable: true\n });\n }\n },\n propTypes: {\n configurable: true,\n get: function () {\n return propTypes;\n },\n set: function (newPropTypes) {\n error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n propTypes = newPropTypes; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'propTypes', {\n enumerable: true\n });\n }\n }\n });\n }\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n {\n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n } else if (typeof render !== 'function') {\n error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n if (render.length !== 0 && render.length !== 2) {\n error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');\n }\n }\n\n if (render != null) {\n if (render.defaultProps != null || render.propTypes != null) {\n error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');\n }\n }\n }\n\n var elementType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n\n if (render.displayName == null) {\n render.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\n// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n\n var elementType = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n\n if (type.displayName == null) {\n type.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nfunction resolveDispatcher() {\n var dispatcher = ReactCurrentDispatcher.current;\n\n if (!(dispatcher !== null)) {\n {\n throw Error( \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.\" );\n }\n }\n\n return dispatcher;\n}\n\nfunction useContext(Context, unstable_observedBits) {\n var dispatcher = resolveDispatcher();\n\n {\n if (unstable_observedBits !== undefined) {\n error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\\n\\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://reactjs.org/link/rules-of-hooks' : '');\n } // TODO: add a more generic warning for invalid values.\n\n\n if (Context._context !== undefined) {\n var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n if (realContext.Consumer === Context) {\n error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');\n } else if (realContext.Provider === Context) {\n error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n }\n }\n }\n\n return dispatcher.useContext(Context, unstable_observedBits);\n}\nfunction useState(initialState) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDebugValue(value, formatterFn);\n }\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: _assign({}, props, {\n value: prevLog\n }),\n info: _assign({}, props, {\n value: prevInfo\n }),\n warn: _assign({}, props, {\n value: prevWarn\n }),\n error: _assign({}, props, {\n value: prevError\n }),\n group: _assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: _assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: _assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if (!fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher$1.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at ');\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher$1.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case exports.Suspense:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_BLOCK_TYPE:\n return describeFunctionComponentFrame(type._render);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n setExtraStackFrame(stack);\n } else {\n setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = getComponentName(ReactCurrentOwner.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendumForProps(elementProps) {\n if (elementProps !== null && elementProps !== undefined) {\n return getSourceInfoErrorAddendum(elementProps.__source);\n }\n\n return '';\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentName(element._owner.type) + \".\";\n }\n\n {\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n\n if (Array.isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentName(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentName(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\nfunction createElementWithValidation(type, props, children) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (Array.isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentName(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n {\n error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n }\n\n var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n if (type === exports.Fragment) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n}\nvar didWarnAboutDeprecatedCreateFactory = false;\nfunction createFactoryWithValidation(type) {\n var validatedFactory = createElementWithValidation.bind(null, type);\n validatedFactory.type = type;\n\n {\n if (!didWarnAboutDeprecatedCreateFactory) {\n didWarnAboutDeprecatedCreateFactory = true;\n\n warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');\n } // Legacy hook: remove it\n\n\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n\n return validatedFactory;\n}\nfunction cloneElementWithValidation(element, props, children) {\n var newElement = cloneElement.apply(this, arguments);\n\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n\n validatePropTypes(newElement);\n return newElement;\n}\n\n{\n\n try {\n var frozenObject = Object.freeze({});\n /* eslint-disable no-new */\n\n new Map([[frozenObject, null]]);\n new Set([frozenObject]);\n /* eslint-enable no-new */\n } catch (e) {\n }\n}\n\nvar createElement$1 = createElementWithValidation ;\nvar cloneElement$1 = cloneElementWithValidation ;\nvar createFactory = createFactoryWithValidation ;\nvar Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.PureComponent = PureComponent;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.cloneElement = cloneElement$1;\nexports.createContext = createContext;\nexports.createElement = createElement$1;\nexports.createFactory = createFactory;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useEffect = useEffect;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.version = ReactVersion;\n })();\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _adal = _interopRequireDefault(require(\"./adal\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n/**\n * Validates each resource token in cache againt current user\n */\n_adal[\"default\"].prototype.invalidateResourceTokens = function () {\n var _this = this;\n\n if (!this.config.endpoints) {\n return;\n }\n\n var idToken = this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);\n\n if (!idToken) {\n return;\n }\n\n var _this$_extractIdToken = this._extractIdToken(idToken),\n upn = _this$_extractIdToken.upn;\n\n var resources = Object.values(this.config.endpoints);\n resources.forEach(function (r) {\n return _this._clearStaleResourceToken(r, upn);\n });\n};\n/**\n * Clears cache for the given resource if it doesn't belong to current user's UPN\n * @param {string} currentUserUpn Unique user identifier\n * @param {string} resource a URI that identifies the resource\n */\n\n\n_adal[\"default\"].prototype._clearStaleResourceToken = function (resource, currentUserUpn) {\n var resourceToken = this.getCachedToken(resource);\n\n if (resourceToken) {\n var _this$_extractIdToken2 = this._extractIdToken(resourceToken),\n upn = _this$_extractIdToken2.upn;\n\n if (typeof upn == 'string' && typeof currentUserUpn == 'string' && upn.toLowerCase() !== currentUserUpn.toLowerCase()) {\n this.info(\"Clearing invalid cache of resource \".concat(resource));\n this.clearCacheForResource(resource);\n }\n }\n};\n\nvar _default = _adal[\"default\"];\nexports[\"default\"] = _default;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//----------------------------------------------------------------------\n// AdalJS v1.0.18\n// @preserve Copyright (c) Microsoft Open Technologies, Inc.\n// All Rights Reserved\n// Apache License 2.0\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//id\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//----------------------------------------------------------------------\nvar _AuthenticationContext = function () {\n 'use strict';\n /**\n * Configuration options for Authentication Context.\n * @class config\n * @property {string} tenant - Your target tenant.\n * @property {string} clientId - Client ID assigned to your app by Azure Active Directory.\n * @property {string} redirectUri - Endpoint at which you expect to receive tokens.Defaults to `window.location.href`.\n * @property {string} instance - Azure Active Directory Instance.Defaults to `https://login.microsoftonline.com/`.\n * @property {Array} endpoints - Collection of {Endpoint-ResourceId} used for automatically attaching tokens in webApi calls.\n * @property {Boolean} popUp - Set this to true to enable login in a popup winodow instead of a full redirect.Defaults to `false`.\n * @property {string} localLoginUrl - Set this to redirect the user to a custom login page.\n * @property {function} displayCall - User defined function of handling the navigation to Azure AD authorization endpoint in case of login. Defaults to 'null'.\n * @property {string} postLogoutRedirectUri - Redirects the user to postLogoutRedirectUri after logout. Defaults is 'redirectUri'.\n * @property {string} cacheLocation - Sets browser storage to either 'localStorage' or sessionStorage'. Defaults to 'sessionStorage'.\n * @property {Array.} anonymousEndpoints Array of keywords or URI's. Adal will not attach a token to outgoing requests that have these keywords or uri. Defaults to 'null'.\n * @property {number} expireOffsetSeconds If the cached token is about to be expired in the expireOffsetSeconds (in seconds), Adal will renew the token instead of using the cached token. Defaults to 300 seconds.\n * @property {string} correlationId Unique identifier used to map the request with the response. Defaults to RFC4122 version 4 guid (128 bits).\n * @property {number} loadFrameTimeout The number of milliseconds of inactivity before a token renewal response from AAD should be considered timed out.\n */\n\n /**\n * Creates a new AuthenticationContext object.\n * @constructor\n * @param {config} config Configuration options for AuthenticationContext\n */\n\n _AuthenticationContext = function AuthenticationContext(config) {\n /**\n * Enum for request type\n * @enum {string}\n */\n this.REQUEST_TYPE = {\n LOGIN: 'LOGIN',\n RENEW_TOKEN: 'RENEW_TOKEN',\n UNKNOWN: 'UNKNOWN'\n };\n this.RESPONSE_TYPE = {\n ID_TOKEN_TOKEN: 'id_token token',\n TOKEN: 'token'\n };\n /**\n * Enum for storage constants\n * @enum {string}\n */\n\n this.CONSTANTS = {\n ACCESS_TOKEN: 'access_token',\n EXPIRES_IN: 'expires_in',\n ID_TOKEN: 'id_token',\n ERROR_DESCRIPTION: 'error_description',\n SESSION_STATE: 'session_state',\n ERROR: 'error',\n STORAGE: {\n TOKEN_KEYS: 'adal.token.keys',\n ACCESS_TOKEN_KEY: 'adal.access.token.key',\n EXPIRATION_KEY: 'adal.expiration.key',\n STATE_LOGIN: 'adal.state.login',\n STATE_RENEW: 'adal.state.renew',\n NONCE_IDTOKEN: 'adal.nonce.idtoken',\n SESSION_STATE: 'adal.session.state',\n USERNAME: 'adal.username',\n IDTOKEN: 'adal.idtoken',\n ERROR: 'adal.error',\n ERROR_DESCRIPTION: 'adal.error.description',\n LOGIN_REQUEST: 'adal.login.request',\n LOGIN_ERROR: 'adal.login.error',\n RENEW_STATUS: 'adal.token.renew.status',\n ANGULAR_LOGIN_REQUEST: 'adal.angular.login.request'\n },\n RESOURCE_DELIMETER: '|',\n CACHE_DELIMETER: '||',\n LOADFRAME_TIMEOUT: 6000,\n TOKEN_RENEW_STATUS_CANCELED: 'Canceled',\n TOKEN_RENEW_STATUS_COMPLETED: 'Completed',\n TOKEN_RENEW_STATUS_IN_PROGRESS: 'In Progress',\n LOGGING_LEVEL: {\n ERROR: 0,\n WARN: 1,\n INFO: 2,\n VERBOSE: 3\n },\n LEVEL_STRING_MAP: {\n 0: 'ERROR:',\n 1: 'WARNING:',\n 2: 'INFO:',\n 3: 'VERBOSE:'\n },\n POPUP_WIDTH: 483,\n POPUP_HEIGHT: 600\n };\n\n if (_AuthenticationContext.prototype._singletonInstance) {\n return _AuthenticationContext.prototype._singletonInstance;\n }\n\n _AuthenticationContext.prototype._singletonInstance = this; // public\n\n this.instance = 'https://login.microsoftonline.com/';\n this.config = {};\n this.callback = null;\n this.popUp = false;\n this.isAngular = false; // private\n\n this._user = null;\n this._activeRenewals = {};\n this._loginInProgress = false;\n this._acquireTokenInProgress = false;\n this._renewStates = [];\n this._callBackMappedToRenewStates = {};\n this._callBacksMappedToRenewStates = {};\n this._openedWindows = [];\n this._requestType = this.REQUEST_TYPE.LOGIN;\n window._adalInstance = this; // validate before constructor assignments\n\n if (config.displayCall && typeof config.displayCall !== 'function') {\n throw new Error('displayCall is not a function');\n }\n\n if (!config.clientId) {\n throw new Error('clientId is required');\n }\n\n this.config = this._cloneConfig(config);\n if (this.config.navigateToLoginRequestUrl === undefined) this.config.navigateToLoginRequestUrl = true;\n if (this.config.popUp) this.popUp = true;\n if (this.config.callback && typeof this.config.callback === 'function') this.callback = this.config.callback;\n\n if (this.config.instance) {\n this.instance = this.config.instance;\n } // App can request idtoken for itself using clientid as resource\n\n\n if (!this.config.loginResource) {\n this.config.loginResource = this.config.clientId;\n } // redirect and logout_redirect are set to current location by default\n\n\n if (!this.config.redirectUri) {\n // strip off query parameters or hashes from the redirect uri as AAD does not allow those.\n this.config.redirectUri = window.location.href.split(\"?\")[0].split(\"#\")[0];\n }\n\n if (!this.config.postLogoutRedirectUri) {\n // strip off query parameters or hashes from the post logout redirect uri as AAD does not allow those.\n this.config.postLogoutRedirectUri = window.location.href.split(\"?\")[0].split(\"#\")[0];\n }\n\n if (!this.config.anonymousEndpoints) {\n this.config.anonymousEndpoints = [];\n }\n\n if (this.config.isAngular) {\n this.isAngular = this.config.isAngular;\n }\n\n if (this.config.loadFrameTimeout) {\n this.CONSTANTS.LOADFRAME_TIMEOUT = this.config.loadFrameTimeout;\n }\n };\n\n if (typeof window !== 'undefined') {\n window.Logging = {\n piiLoggingEnabled: false,\n level: 0,\n log: function log(message) {}\n };\n }\n /**\n * Initiates the login process by redirecting the user to Azure AD authorization endpoint.\n */\n\n\n _AuthenticationContext.prototype.login = function () {\n if (this._loginInProgress) {\n this.info(\"Login in progress\");\n return;\n }\n\n this._loginInProgress = true; // Token is not present and user needs to login\n\n var expectedState = this._guid();\n\n this.config.state = expectedState;\n this._idTokenNonce = this._guid();\n\n var loginStartPage = this._getItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST);\n\n if (!loginStartPage || loginStartPage === \"\") {\n loginStartPage = window.location.href;\n } else {\n this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST, \"\");\n }\n\n this.verbose('Expected state: ' + expectedState + ' startPage:' + loginStartPage);\n\n this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST, loginStartPage);\n\n this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, '');\n\n this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN, expectedState, true);\n\n this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN, this._idTokenNonce, true);\n\n this._saveItem(this.CONSTANTS.STORAGE.ERROR, '');\n\n this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, '');\n\n var urlNavigate = this._getNavigateUrl('id_token', null) + '&nonce=' + encodeURIComponent(this._idTokenNonce);\n\n if (this.config.displayCall) {\n // User defined way of handling the navigation\n this.config.displayCall(urlNavigate);\n } else if (this.popUp) {\n this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN, ''); // so requestInfo does not match redirect case\n\n\n this._renewStates.push(expectedState);\n\n this.registerCallback(expectedState, this.config.clientId, this.callback);\n\n this._loginPopup(urlNavigate);\n } else {\n this.promptUser(urlNavigate);\n }\n };\n /**\n * Configures popup window for login.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._openPopup = function (urlNavigate, title, popUpWidth, popUpHeight) {\n try {\n /**\n * adding winLeft and winTop to account for dual monitor\n * using screenLeft and screenTop for IE8 and earlier\n */\n var winLeft = window.screenLeft ? window.screenLeft : window.screenX;\n var winTop = window.screenTop ? window.screenTop : window.screenY;\n /**\n * window.innerWidth displays browser window's height and width excluding toolbars\n * using document.documentElement.clientWidth for IE8 and earlier\n */\n\n var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\n var height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\n var left = width / 2 - popUpWidth / 2 + winLeft;\n var top = height / 2 - popUpHeight / 2 + winTop;\n var popupWindow = window.open(urlNavigate, title, 'width=' + popUpWidth + ', height=' + popUpHeight + ', top=' + top + ', left=' + left);\n\n if (popupWindow.focus) {\n popupWindow.focus();\n }\n\n return popupWindow;\n } catch (e) {\n this.warn('Error opening popup, ' + e.message);\n this._loginInProgress = false;\n this._acquireTokenInProgress = false;\n return null;\n }\n };\n\n _AuthenticationContext.prototype._handlePopupError = function (loginCallback, resource, error, errorDesc, loginError) {\n this.warn(errorDesc);\n\n this._saveItem(this.CONSTANTS.STORAGE.ERROR, error);\n\n this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, errorDesc);\n\n this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, loginError);\n\n if (resource && this._activeRenewals[resource]) {\n this._activeRenewals[resource] = null;\n }\n\n this._loginInProgress = false;\n this._acquireTokenInProgress = false;\n\n if (loginCallback) {\n loginCallback(errorDesc, null, error);\n }\n };\n /**\n * After authorization, the user will be sent to your specified redirect_uri with the user's bearer token\n * attached to the URI fragment as an id_token field. It closes popup window after redirection.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._loginPopup = function (urlNavigate, resource, callback) {\n var popupWindow = this._openPopup(urlNavigate, \"login\", this.CONSTANTS.POPUP_WIDTH, this.CONSTANTS.POPUP_HEIGHT);\n\n var loginCallback = callback || this.callback;\n\n if (popupWindow == null) {\n var error = 'Error opening popup';\n var errorDesc = 'Popup Window is null. This can happen if you are using IE';\n\n this._handlePopupError(loginCallback, resource, error, errorDesc, errorDesc);\n\n return;\n }\n\n this._openedWindows.push(popupWindow);\n\n if (this.config.redirectUri.indexOf('#') != -1) {\n var registeredRedirectUri = this.config.redirectUri.split(\"#\")[0];\n } else {\n var registeredRedirectUri = this.config.redirectUri;\n }\n\n var that = this;\n var pollTimer = window.setInterval(function () {\n if (!popupWindow || popupWindow.closed || popupWindow.closed === undefined) {\n var error = 'Popup Window closed';\n var errorDesc = 'Popup Window closed by UI action/ Popup Window handle destroyed due to cross zone navigation in IE/Edge';\n\n if (that.isAngular) {\n that._broadcast('adal:popUpClosed', errorDesc + that.CONSTANTS.RESOURCE_DELIMETER + error);\n }\n\n that._handlePopupError(loginCallback, resource, error, errorDesc, errorDesc);\n\n window.clearInterval(pollTimer);\n return;\n }\n\n try {\n var popUpWindowLocation = popupWindow.location;\n\n if (encodeURI(popUpWindowLocation.href).indexOf(encodeURI(registeredRedirectUri)) != -1) {\n if (that.isAngular) {\n that._broadcast('adal:popUpHashChanged', popUpWindowLocation.hash);\n } else {\n that.handleWindowCallback(popUpWindowLocation.hash);\n }\n\n window.clearInterval(pollTimer);\n that._loginInProgress = false;\n that._acquireTokenInProgress = false;\n that.info(\"Closing popup window\");\n that._openedWindows = [];\n popupWindow.close();\n return;\n }\n } catch (e) {}\n }, 1);\n };\n\n _AuthenticationContext.prototype._broadcast = function (eventName, data) {\n // Custom Event is not supported in IE, below IIFE will polyfill the CustomEvent() constructor functionality in Internet Explorer 9 and higher\n (function () {\n if (typeof window.CustomEvent === \"function\") {\n return false;\n }\n\n function CustomEvent(event, params) {\n params = params || {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n }\n\n CustomEvent.prototype = window.Event.prototype;\n window.CustomEvent = CustomEvent;\n })();\n\n var evt = new CustomEvent(eventName, {\n detail: data\n });\n window.dispatchEvent(evt);\n };\n\n _AuthenticationContext.prototype.loginInProgress = function () {\n return this._loginInProgress;\n };\n /**\n * Checks for the resource in the cache. By default, cache location is Session Storage\n * @ignore\n * @returns {Boolean} 'true' if login is in progress, else returns 'false'.\n */\n\n\n _AuthenticationContext.prototype._hasResource = function (key) {\n var keys = this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);\n\n return keys && !this._isEmpty(keys) && keys.indexOf(key + this.CONSTANTS.RESOURCE_DELIMETER) > -1;\n };\n /**\n * Gets token for the specified resource from the cache.\n * @param {string} resource A URI that identifies the resource for which the token is requested.\n * @returns {string} token if if it exists and not expired, otherwise null.\n */\n\n\n _AuthenticationContext.prototype.getCachedToken = function (resource) {\n if (!this._hasResource(resource)) {\n return null;\n }\n\n var token = this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + resource);\n\n var expiry = this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + resource); // If expiration is within offset, it will force renew\n\n\n var offset = this.config.expireOffsetSeconds || 300;\n\n if (expiry && expiry > this._now() + offset) {\n return token;\n } else {\n this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + resource, '');\n\n this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + resource, 0);\n\n return null;\n }\n };\n /**\n * User information from idtoken.\n * @class User\n * @property {string} userName - username assigned from upn or email.\n * @property {object} profile - properties parsed from idtoken.\n */\n\n /**\n * If user object exists, returns it. Else creates a new user object by decoding id_token from the cache.\n * @returns {User} user object\n */\n\n\n _AuthenticationContext.prototype.getCachedUser = function () {\n if (this._user) {\n return this._user;\n }\n\n var idtoken = this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);\n\n this._user = this._createUser(idtoken);\n return this._user;\n };\n /**\n * Adds the passed callback to the array of callbacks for the specified resource and puts the array on the window object. \n * @param {string} resource A URI that identifies the resource for which the token is requested.\n * @param {string} expectedState A unique identifier (guid).\n * @param {tokenCallback} callback - The callback provided by the caller. It will be called with token or error.\n */\n\n\n _AuthenticationContext.prototype.registerCallback = function (expectedState, resource, callback) {\n this._activeRenewals[resource] = expectedState;\n\n if (!this._callBacksMappedToRenewStates[expectedState]) {\n this._callBacksMappedToRenewStates[expectedState] = [];\n }\n\n var self = this;\n\n this._callBacksMappedToRenewStates[expectedState].push(callback);\n\n if (!this._callBackMappedToRenewStates[expectedState]) {\n this._callBackMappedToRenewStates[expectedState] = function (errorDesc, token, error, tokenType) {\n self._activeRenewals[resource] = null;\n\n for (var i = 0; i < self._callBacksMappedToRenewStates[expectedState].length; ++i) {\n try {\n self._callBacksMappedToRenewStates[expectedState][i](errorDesc, token, error, tokenType);\n } catch (error) {\n self.warn(error);\n }\n }\n\n self._callBacksMappedToRenewStates[expectedState] = null;\n self._callBackMappedToRenewStates[expectedState] = null;\n };\n }\n }; // var errorResponse = {error:'', error_description:''};\n // var token = 'string token';\n // callback(errorResponse, token)\n // with callback\n\n /**\n * Acquires access token with hidden iframe\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._renewToken = function (resource, callback, responseType) {\n // use iframe to try to renew token\n // use given resource to create new authz url\n this.info('renewToken is called for resource:' + resource);\n\n var frameHandle = this._addAdalFrame('adalRenewFrame' + resource);\n\n var expectedState = this._guid() + '|' + resource;\n this.config.state = expectedState; // renew happens in iframe, so it keeps javascript context\n\n this._renewStates.push(expectedState);\n\n this.verbose('Renew token Expected state: ' + expectedState); // remove the existing prompt=... query parameter and add prompt=none\n\n responseType = responseType || 'token';\n\n var urlNavigate = this._urlRemoveQueryStringParameter(this._getNavigateUrl(responseType, resource), 'prompt');\n\n if (responseType === this.RESPONSE_TYPE.ID_TOKEN_TOKEN) {\n this._idTokenNonce = this._guid();\n\n this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN, this._idTokenNonce, true);\n\n urlNavigate += '&nonce=' + encodeURIComponent(this._idTokenNonce);\n }\n\n urlNavigate = urlNavigate + '&prompt=none';\n urlNavigate = this._addHintParameters(urlNavigate);\n this.registerCallback(expectedState, resource, callback);\n this.verbosePii('Navigate to:' + urlNavigate);\n frameHandle.src = 'about:blank';\n\n this._loadFrameTimeout(urlNavigate, 'adalRenewFrame' + resource, resource);\n };\n /**\n * Renews idtoken for app's own backend when resource is clientId and calls the callback with token/error\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._renewIdToken = function (callback, responseType) {\n // use iframe to try to renew token\n this.info('renewIdToken is called');\n\n var frameHandle = this._addAdalFrame('adalIdTokenFrame');\n\n var expectedState = this._guid() + '|' + this.config.clientId;\n this._idTokenNonce = this._guid();\n\n this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN, this._idTokenNonce, true);\n\n this.config.state = expectedState; // renew happens in iframe, so it keeps javascript context\n\n this._renewStates.push(expectedState);\n\n this.verbose('Renew Idtoken Expected state: ' + expectedState); // remove the existing prompt=... query parameter and add prompt=none\n\n var resource = responseType === null || typeof responseType === \"undefined\" ? null : this.config.clientId;\n var responseType = responseType || 'id_token';\n\n var urlNavigate = this._urlRemoveQueryStringParameter(this._getNavigateUrl(responseType, resource), 'prompt');\n\n urlNavigate = urlNavigate + '&prompt=none';\n urlNavigate = this._addHintParameters(urlNavigate);\n urlNavigate += '&nonce=' + encodeURIComponent(this._idTokenNonce);\n this.registerCallback(expectedState, this.config.clientId, callback);\n this.verbosePii('Navigate to:' + urlNavigate);\n frameHandle.src = 'about:blank';\n\n this._loadFrameTimeout(urlNavigate, 'adalIdTokenFrame', this.config.clientId);\n };\n /**\n * Checks if the authorization endpoint URL contains query string parameters\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._urlContainsQueryStringParameter = function (name, url) {\n // regex to detect pattern of a ? or & followed by the name parameter and an equals character\n var regex = new RegExp(\"[\\\\?&]\" + name + \"=\");\n return regex.test(url);\n };\n /**\n * Removes the query string parameter from the authorization endpoint URL if it exists\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._urlRemoveQueryStringParameter = function (url, name) {\n // we remove &name=value, name=value& and name=value\n // &name=value\n var regex = new RegExp('(\\\\&' + name + '=)[^\\&]+');\n url = url.replace(regex, ''); // name=value&\n\n regex = new RegExp('(' + name + '=)[^\\&]+&');\n url = url.replace(regex, ''); // name=value\n\n regex = new RegExp('(' + name + '=)[^\\&]+');\n url = url.replace(regex, '');\n return url;\n }; // Calling _loadFrame but with a timeout to signal failure in loadframeStatus. Callbacks are left\n // registered when network errors occur and subsequent token requests for same resource are registered to the pending request\n\n /**\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._loadFrameTimeout = function (urlNavigation, frameName, resource) {\n //set iframe session to pending\n this.verbose('Set loading state to pending for: ' + resource);\n\n this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS + resource, this.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS);\n\n this._loadFrame(urlNavigation, frameName);\n\n var self = this;\n setTimeout(function () {\n if (self._getItem(self.CONSTANTS.STORAGE.RENEW_STATUS + resource) === self.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS) {\n // fail the iframe session if it's in pending state\n self.verbose('Loading frame has timed out after: ' + self.CONSTANTS.LOADFRAME_TIMEOUT / 1000 + ' seconds for resource ' + resource);\n var expectedState = self._activeRenewals[resource];\n\n if (expectedState && self._callBackMappedToRenewStates[expectedState]) {\n self._callBackMappedToRenewStates[expectedState]('Token renewal operation failed due to timeout', null, 'Token Renewal Failed');\n }\n\n self._saveItem(self.CONSTANTS.STORAGE.RENEW_STATUS + resource, self.CONSTANTS.TOKEN_RENEW_STATUS_CANCELED);\n }\n }, self.CONSTANTS.LOADFRAME_TIMEOUT);\n };\n /**\n * Loads iframe with authorization endpoint URL\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._loadFrame = function (urlNavigate, frameName) {\n // This trick overcomes iframe navigation in IE\n // IE does not load the page consistently in iframe\n var self = this;\n self.info('LoadFrame: ' + frameName);\n var frameCheck = frameName;\n setTimeout(function () {\n var frameHandle = self._addAdalFrame(frameCheck);\n\n if (frameHandle.src === '' || frameHandle.src === 'about:blank') {\n frameHandle.src = urlNavigate;\n\n self._loadFrame(urlNavigate, frameCheck);\n }\n }, 500);\n };\n /**\n * @callback tokenCallback\n * @param {string} error_description error description returned from AAD if token request fails.\n * @param {string} token token returned from AAD if token request is successful.\n * @param {string} error error message returned from AAD if token request fails.\n */\n\n /**\n * Acquires token from the cache if it is not expired. Otherwise sends request to AAD to obtain a new token.\n * @param {string} resource ResourceUri identifying the target resource\n * @param {tokenCallback} callback - The callback provided by the caller. It will be called with token or error.\n */\n\n\n _AuthenticationContext.prototype.acquireToken = function (resource, callback) {\n if (this._isEmpty(resource)) {\n this.warn('resource is required');\n callback('resource is required', null, 'resource is required');\n return;\n }\n\n var token = this.getCachedToken(resource);\n\n if (token) {\n this.info('Token is already in cache for resource:' + resource);\n callback(null, token, null);\n return;\n }\n\n if (!this._user && !(this.config.extraQueryParameter && this.config.extraQueryParameter.indexOf('login_hint') !== -1)) {\n this.warn('User login is required');\n callback('User login is required', null, 'login required');\n return;\n } // renew attempt with iframe\n // Already renewing for this resource, callback when we get the token.\n\n\n if (this._activeRenewals[resource]) {\n // Active renewals contains the state for each renewal.\n this.registerCallback(this._activeRenewals[resource], resource, callback);\n } else {\n this._requestType = this.REQUEST_TYPE.RENEW_TOKEN;\n\n if (resource === this.config.clientId) {\n // App uses idtoken to send to api endpoints\n // Default resource is tracked as clientid to store this token\n if (this._user) {\n this.verbose('renewing idtoken');\n\n this._renewIdToken(callback);\n } else {\n this.verbose('renewing idtoken and access_token');\n\n this._renewIdToken(callback, this.RESPONSE_TYPE.ID_TOKEN_TOKEN);\n }\n } else {\n if (this._user) {\n this.verbose('renewing access_token');\n\n this._renewToken(resource, callback);\n } else {\n this.verbose('renewing idtoken and access_token');\n\n this._renewToken(resource, callback, this.RESPONSE_TYPE.ID_TOKEN_TOKEN);\n }\n }\n }\n };\n /**\n * Acquires token (interactive flow using a popUp window) by sending request to AAD to obtain a new token.\n * @param {string} resource ResourceUri identifying the target resource\n * @param {string} extraQueryParameters extraQueryParameters to add to the authentication request\n * @param {tokenCallback} callback - The callback provided by the caller. It will be called with token or error.\n */\n\n\n _AuthenticationContext.prototype.acquireTokenPopup = function (resource, extraQueryParameters, claims, callback) {\n if (this._isEmpty(resource)) {\n this.warn('resource is required');\n callback('resource is required', null, 'resource is required');\n return;\n }\n\n if (!this._user) {\n this.warn('User login is required');\n callback('User login is required', null, 'login required');\n return;\n }\n\n if (this._acquireTokenInProgress) {\n this.warn(\"Acquire token interactive is already in progress\");\n callback(\"Acquire token interactive is already in progress\", null, \"Acquire token interactive is already in progress\");\n return;\n }\n\n var expectedState = this._guid() + '|' + resource;\n this.config.state = expectedState;\n\n this._renewStates.push(expectedState);\n\n this._requestType = this.REQUEST_TYPE.RENEW_TOKEN;\n this.verbose('Renew token Expected state: ' + expectedState); // remove the existing prompt=... query parameter and add prompt=select_account\n\n var urlNavigate = this._urlRemoveQueryStringParameter(this._getNavigateUrl('token', resource), 'prompt');\n\n urlNavigate = urlNavigate + '&prompt=select_account';\n\n if (extraQueryParameters) {\n urlNavigate += extraQueryParameters;\n }\n\n if (claims && urlNavigate.indexOf(\"&claims\") === -1) {\n urlNavigate += '&claims=' + encodeURIComponent(claims);\n } else if (claims && urlNavigate.indexOf(\"&claims\") !== -1) {\n throw new Error('Claims cannot be passed as an extraQueryParameter');\n }\n\n urlNavigate = this._addHintParameters(urlNavigate);\n this._acquireTokenInProgress = true;\n this.info('acquireToken interactive is called for the resource ' + resource);\n this.registerCallback(expectedState, resource, callback);\n\n this._loginPopup(urlNavigate, resource, callback);\n };\n /**\n * Acquires token (interactive flow using a redirect) by sending request to AAD to obtain a new token. In this case the callback passed in the Authentication\n * request constructor will be called.\n * @param {string} resource ResourceUri identifying the target resource\n * @param {string} extraQueryParameters extraQueryParameters to add to the authentication request\n */\n\n\n _AuthenticationContext.prototype.acquireTokenRedirect = function (resource, extraQueryParameters, claims) {\n if (this._isEmpty(resource)) {\n this.warn('resource is required');\n callback('resource is required', null, 'resource is required');\n return;\n }\n\n var callback = this.callback;\n\n if (!this._user) {\n this.warn('User login is required');\n callback('User login is required', null, 'login required');\n return;\n }\n\n if (this._acquireTokenInProgress) {\n this.warn(\"Acquire token interactive is already in progress\");\n callback(\"Acquire token interactive is already in progress\", null, \"Acquire token interactive is already in progress\");\n return;\n }\n\n var expectedState = this._guid() + '|' + resource;\n this.config.state = expectedState;\n this.verbose('Renew token Expected state: ' + expectedState); // remove the existing prompt=... query parameter and add prompt=select_account\n\n var urlNavigate = this._urlRemoveQueryStringParameter(this._getNavigateUrl('token', resource), 'prompt');\n\n urlNavigate = urlNavigate + '&prompt=select_account';\n\n if (extraQueryParameters) {\n urlNavigate += extraQueryParameters;\n }\n\n if (claims && urlNavigate.indexOf(\"&claims\") === -1) {\n urlNavigate += '&claims=' + encodeURIComponent(claims);\n } else if (claims && urlNavigate.indexOf(\"&claims\") !== -1) {\n throw new Error('Claims cannot be passed as an extraQueryParameter');\n }\n\n urlNavigate = this._addHintParameters(urlNavigate);\n this._acquireTokenInProgress = true;\n this.info('acquireToken interactive is called for the resource ' + resource);\n\n this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST, window.location.href);\n\n this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW, expectedState, true);\n\n this.promptUser(urlNavigate);\n };\n /**\n * Redirects the browser to Azure AD authorization endpoint.\n * @param {string} urlNavigate Url of the authorization endpoint.\n */\n\n\n _AuthenticationContext.prototype.promptUser = function (urlNavigate) {\n if (urlNavigate) {\n this.infoPii('Navigate to:' + urlNavigate);\n window.location.replace(urlNavigate);\n } else {\n this.info('Navigate url is empty');\n }\n };\n /**\n * Clears cache items.\n */\n\n\n _AuthenticationContext.prototype.clearCache = function () {\n this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST, '');\n\n this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST, '');\n\n this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE, '');\n\n this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN, '');\n\n this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW, '');\n\n this._renewStates = [];\n\n this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN, '');\n\n this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN, '');\n\n this._saveItem(this.CONSTANTS.STORAGE.ERROR, '');\n\n this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, '');\n\n this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, '');\n\n this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, '');\n\n var keys = this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);\n\n if (!this._isEmpty(keys)) {\n keys = keys.split(this.CONSTANTS.RESOURCE_DELIMETER);\n\n for (var i = 0; i < keys.length && keys[i] !== \"\"; i++) {\n this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + keys[i], '');\n\n this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + keys[i], 0);\n }\n }\n\n this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS, '');\n };\n /**\n * Clears cache items for a given resource.\n * @param {string} resource a URI that identifies the resource.\n */\n\n\n _AuthenticationContext.prototype.clearCacheForResource = function (resource) {\n this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW, '');\n\n this._saveItem(this.CONSTANTS.STORAGE.ERROR, '');\n\n this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, '');\n\n if (this._hasResource(resource)) {\n this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + resource, '');\n\n this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + resource, 0);\n }\n };\n /**\n * Redirects user to logout endpoint.\n * After logout, it will redirect to postLogoutRedirectUri if added as a property on the config object.\n */\n\n\n _AuthenticationContext.prototype.logOut = function () {\n this.clearCache();\n this._user = null;\n var urlNavigate;\n\n if (this.config.logOutUri) {\n urlNavigate = this.config.logOutUri;\n } else {\n var tenant = 'common';\n var logout = '';\n\n if (this.config.tenant) {\n tenant = this.config.tenant;\n }\n\n if (this.config.postLogoutRedirectUri) {\n logout = 'post_logout_redirect_uri=' + encodeURIComponent(this.config.postLogoutRedirectUri);\n }\n\n urlNavigate = this.instance + tenant + '/oauth2/logout?' + logout;\n }\n\n this.infoPii('Logout navigate to: ' + urlNavigate);\n this.promptUser(urlNavigate);\n };\n\n _AuthenticationContext.prototype._isEmpty = function (str) {\n return typeof str === 'undefined' || !str || 0 === str.length;\n };\n /**\n * @callback userCallback\n * @param {string} error error message if user info is not available.\n * @param {User} user user object retrieved from the cache.\n */\n\n /**\n * Calls the passed in callback with the user object or error message related to the user.\n * @param {userCallback} callback - The callback provided by the caller. It will be called with user or error.\n */\n\n\n _AuthenticationContext.prototype.getUser = function (callback) {\n // IDToken is first call\n if (typeof callback !== 'function') {\n throw new Error('callback is not a function');\n } // user in memory\n\n\n if (this._user) {\n callback(null, this._user);\n return;\n } // frame is used to get idtoken\n\n\n var idtoken = this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);\n\n if (!this._isEmpty(idtoken)) {\n this.info('User exists in cache: ');\n this._user = this._createUser(idtoken);\n callback(null, this._user);\n } else {\n this.warn('User information is not available');\n callback('User information is not available', null);\n }\n };\n /**\n * Adds login_hint to authorization URL which is used to pre-fill the username field of sign in page for the user if known ahead of time.\n * domain_hint can be one of users/organisations which when added skips the email based discovery process of the user.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._addHintParameters = function (urlNavigate) {\n //If you don�t use prompt=none, then if the session does not exist, there will be a failure.\n //If sid is sent alongside domain or login hints, there will be a failure since request is ambiguous.\n //If sid is sent with a prompt value other than none or attempt_none, there will be a failure since the request is ambiguous.\n if (this._user && this._user.profile) {\n if (this._user.profile.sid && urlNavigate.indexOf('&prompt=none') !== -1) {\n // don't add sid twice if user provided it in the extraQueryParameter value\n if (!this._urlContainsQueryStringParameter(\"sid\", urlNavigate)) {\n // add sid\n urlNavigate += '&sid=' + encodeURIComponent(this._user.profile.sid);\n }\n } else if (this._user.profile.upn) {\n // don't add login_hint twice if user provided it in the extraQueryParameter value\n if (!this._urlContainsQueryStringParameter(\"login_hint\", urlNavigate)) {\n // add login_hint\n urlNavigate += '&login_hint=' + encodeURIComponent(this._user.profile.upn);\n } // don't add domain_hint twice if user provided it in the extraQueryParameter value\n\n\n if (!this._urlContainsQueryStringParameter(\"domain_hint\", urlNavigate) && this._user.profile.upn.indexOf('@') > -1) {\n var parts = this._user.profile.upn.split('@'); // local part can include @ in quotes. Sending last part handles that.\n\n\n urlNavigate += '&domain_hint=' + encodeURIComponent(parts[parts.length - 1]);\n }\n }\n }\n\n return urlNavigate;\n };\n /**\n * Creates a user object by decoding the id_token\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._createUser = function (idToken) {\n var user = null;\n\n var parsedJson = this._extractIdToken(idToken);\n\n if (parsedJson && parsedJson.hasOwnProperty('aud')) {\n if (parsedJson.aud.toLowerCase() === this.config.clientId.toLowerCase()) {\n user = {\n userName: '',\n profile: parsedJson\n };\n\n if (parsedJson.hasOwnProperty('upn')) {\n user.userName = parsedJson.upn;\n } else if (parsedJson.hasOwnProperty('email')) {\n user.userName = parsedJson.email;\n }\n } else {\n this.warn('IdToken has invalid aud field');\n }\n }\n\n return user;\n };\n /**\n * Returns the anchor part(#) of the URL\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._getHash = function (hash) {\n if (hash.indexOf('#/') > -1) {\n hash = hash.substring(hash.indexOf('#/') + 2);\n } else if (hash.indexOf('#') > -1) {\n hash = hash.substring(1);\n }\n\n return hash;\n };\n /**\n * Checks if the URL fragment contains access token, id token or error_description.\n * @param {string} hash - Hash passed from redirect page\n * @returns {Boolean} true if response contains id_token, access_token or error, false otherwise.\n */\n\n\n _AuthenticationContext.prototype.isCallback = function (hash) {\n hash = this._getHash(hash);\n\n var parameters = this._deserialize(hash);\n\n return parameters.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION) || parameters.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN) || parameters.hasOwnProperty(this.CONSTANTS.ID_TOKEN);\n };\n /**\n * Gets login error\n * @returns {string} error message related to login.\n */\n\n\n _AuthenticationContext.prototype.getLoginError = function () {\n return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR);\n };\n /**\n * Request info object created from the response received from AAD.\n * @class RequestInfo\n * @property {object} parameters - object comprising of fields such as id_token/error, session_state, state, e.t.c.\n * @property {REQUEST_TYPE} requestType - either LOGIN, RENEW_TOKEN or UNKNOWN.\n * @property {boolean} stateMatch - true if state is valid, false otherwise.\n * @property {string} stateResponse - unique guid used to match the response with the request.\n * @property {boolean} valid - true if requestType contains id_token, access_token or error, false otherwise.\n */\n\n /**\n * Creates a requestInfo object from the URL fragment and returns it.\n * @returns {RequestInfo} an object created from the redirect response from AAD comprising of the keys - parameters, requestType, stateMatch, stateResponse and valid.\n */\n\n\n _AuthenticationContext.prototype.getRequestInfo = function (hash) {\n hash = this._getHash(hash);\n\n var parameters = this._deserialize(hash);\n\n var requestInfo = {\n valid: false,\n parameters: {},\n stateMatch: false,\n stateResponse: '',\n requestType: this.REQUEST_TYPE.UNKNOWN\n };\n\n if (parameters) {\n requestInfo.parameters = parameters;\n\n if (parameters.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION) || parameters.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN) || parameters.hasOwnProperty(this.CONSTANTS.ID_TOKEN)) {\n requestInfo.valid = true; // which call\n\n var stateResponse = '';\n\n if (parameters.hasOwnProperty('state')) {\n this.verbose('State: ' + parameters.state);\n stateResponse = parameters.state;\n } else {\n this.warn('No state returned');\n return requestInfo;\n }\n\n requestInfo.stateResponse = stateResponse; // async calls can fire iframe and login request at the same time if developer does not use the API as expected\n // incoming callback needs to be looked up to find the request type\n\n if (this._matchState(requestInfo)) {\n // loginRedirect or acquireTokenRedirect\n return requestInfo;\n } // external api requests may have many renewtoken requests for different resource\n\n\n if (!requestInfo.stateMatch && window.parent) {\n requestInfo.requestType = this._requestType;\n var statesInParentContext = this._renewStates;\n\n for (var i = 0; i < statesInParentContext.length; i++) {\n if (statesInParentContext[i] === requestInfo.stateResponse) {\n requestInfo.stateMatch = true;\n break;\n }\n }\n }\n }\n }\n\n return requestInfo;\n };\n /**\n * Matches nonce from the request with the response.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._matchNonce = function (user) {\n var requestNonce = this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN);\n\n if (requestNonce) {\n requestNonce = requestNonce.split(this.CONSTANTS.CACHE_DELIMETER);\n\n for (var i = 0; i < requestNonce.length; i++) {\n if (requestNonce[i] && requestNonce[i] === user.profile.nonce) {\n return true;\n }\n }\n }\n\n return false;\n };\n /**\n * Matches state from the request with the response.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._matchState = function (requestInfo) {\n var loginStates = this._getItem(this.CONSTANTS.STORAGE.STATE_LOGIN);\n\n if (loginStates) {\n loginStates = loginStates.split(this.CONSTANTS.CACHE_DELIMETER);\n\n for (var i = 0; i < loginStates.length; i++) {\n if (loginStates[i] && loginStates[i] === requestInfo.stateResponse) {\n requestInfo.requestType = this.REQUEST_TYPE.LOGIN;\n requestInfo.stateMatch = true;\n return true;\n }\n }\n }\n\n var acquireTokenStates = this._getItem(this.CONSTANTS.STORAGE.STATE_RENEW);\n\n if (acquireTokenStates) {\n acquireTokenStates = acquireTokenStates.split(this.CONSTANTS.CACHE_DELIMETER);\n\n for (var i = 0; i < acquireTokenStates.length; i++) {\n if (acquireTokenStates[i] && acquireTokenStates[i] === requestInfo.stateResponse) {\n requestInfo.requestType = this.REQUEST_TYPE.RENEW_TOKEN;\n requestInfo.stateMatch = true;\n return true;\n }\n }\n }\n\n return false;\n };\n /**\n * Extracts resource value from state.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._getResourceFromState = function (state) {\n if (state) {\n var splitIndex = state.indexOf('|');\n\n if (splitIndex > -1 && splitIndex + 1 < state.length) {\n return state.substring(splitIndex + 1);\n }\n }\n\n return '';\n };\n /**\n * Saves token or error received in the response from AAD in the cache. In case of id_token, it also creates the user object.\n */\n\n\n _AuthenticationContext.prototype.saveTokenFromHash = function (requestInfo) {\n this.info('State status:' + requestInfo.stateMatch + '; Request type:' + requestInfo.requestType);\n\n this._saveItem(this.CONSTANTS.STORAGE.ERROR, '');\n\n this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, '');\n\n var resource = this._getResourceFromState(requestInfo.stateResponse); // Record error\n\n\n if (requestInfo.parameters.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)) {\n this.infoPii('Error :' + requestInfo.parameters.error + '; Error description:' + requestInfo.parameters[this.CONSTANTS.ERROR_DESCRIPTION]);\n\n this._saveItem(this.CONSTANTS.STORAGE.ERROR, requestInfo.parameters.error);\n\n this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, requestInfo.parameters[this.CONSTANTS.ERROR_DESCRIPTION]);\n\n if (requestInfo.requestType === this.REQUEST_TYPE.LOGIN) {\n this._loginInProgress = false;\n\n this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, requestInfo.parameters.error_description);\n }\n } else {\n // It must verify the state from redirect\n if (requestInfo.stateMatch) {\n // record tokens to storage if exists\n this.info('State is right');\n\n if (requestInfo.parameters.hasOwnProperty(this.CONSTANTS.SESSION_STATE)) {\n this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE, requestInfo.parameters[this.CONSTANTS.SESSION_STATE]);\n }\n\n var keys;\n\n if (requestInfo.parameters.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)) {\n this.info('Fragment has access token');\n\n if (!this._hasResource(resource)) {\n keys = this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS) || '';\n\n this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS, keys + resource + this.CONSTANTS.RESOURCE_DELIMETER);\n } // save token with related resource\n\n\n this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + resource, requestInfo.parameters[this.CONSTANTS.ACCESS_TOKEN]);\n\n this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + resource, this._expiresIn(requestInfo.parameters[this.CONSTANTS.EXPIRES_IN]));\n }\n\n if (requestInfo.parameters.hasOwnProperty(this.CONSTANTS.ID_TOKEN)) {\n this.info('Fragment has id token');\n this._loginInProgress = false;\n this._user = this._createUser(requestInfo.parameters[this.CONSTANTS.ID_TOKEN]);\n\n if (this._user && this._user.profile) {\n if (!this._matchNonce(this._user)) {\n this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, 'Nonce received: ' + this._user.profile.nonce + ' is not same as requested: ' + this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN));\n\n this._user = null;\n } else {\n this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN, requestInfo.parameters[this.CONSTANTS.ID_TOKEN]); // Save idtoken as access token for app itself\n\n\n resource = this.config.loginResource ? this.config.loginResource : this.config.clientId;\n\n if (!this._hasResource(resource)) {\n keys = this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS) || '';\n\n this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS, keys + resource + this.CONSTANTS.RESOURCE_DELIMETER);\n }\n\n this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + resource, requestInfo.parameters[this.CONSTANTS.ID_TOKEN]);\n\n this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + resource, this._user.profile.exp);\n }\n } else {\n requestInfo.parameters['error'] = 'invalid id_token';\n requestInfo.parameters['error_description'] = 'Invalid id_token. id_token: ' + requestInfo.parameters[this.CONSTANTS.ID_TOKEN];\n\n this._saveItem(this.CONSTANTS.STORAGE.ERROR, 'invalid id_token');\n\n this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, 'Invalid id_token. id_token: ' + requestInfo.parameters[this.CONSTANTS.ID_TOKEN]);\n }\n }\n } else {\n requestInfo.parameters['error'] = 'Invalid_state';\n requestInfo.parameters['error_description'] = 'Invalid_state. state: ' + requestInfo.stateResponse;\n\n this._saveItem(this.CONSTANTS.STORAGE.ERROR, 'Invalid_state');\n\n this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, 'Invalid_state. state: ' + requestInfo.stateResponse);\n }\n }\n\n this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS + resource, this.CONSTANTS.TOKEN_RENEW_STATUS_COMPLETED);\n };\n /**\n * Gets resource for given endpoint if mapping is provided with config.\n * @param {string} endpoint - The URI for which the resource Id is requested.\n * @returns {string} resource for this API endpoint.\n */\n\n\n _AuthenticationContext.prototype.getResourceForEndpoint = function (endpoint) {\n // if user specified list of anonymous endpoints, no need to send token to these endpoints, return null.\n if (this.config && this.config.anonymousEndpoints) {\n for (var i = 0; i < this.config.anonymousEndpoints.length; i++) {\n if (endpoint.indexOf(this.config.anonymousEndpoints[i]) > -1) {\n return null;\n }\n }\n }\n\n if (this.config && this.config.endpoints) {\n for (var configEndpoint in this.config.endpoints) {\n // configEndpoint is like /api/Todo requested endpoint can be /api/Todo/1\n if (endpoint.indexOf(configEndpoint) > -1) {\n return this.config.endpoints[configEndpoint];\n }\n }\n } // default resource will be clientid if nothing specified\n // App will use idtoken for calls to itself\n // check if it's staring from http or https, needs to match with app host\n\n\n if (endpoint.indexOf('http://') > -1 || endpoint.indexOf('https://') > -1) {\n if (this._getHostFromUri(endpoint) === this._getHostFromUri(this.config.redirectUri)) {\n return this.config.loginResource;\n }\n } else {\n // in angular level, the url for $http interceptor call could be relative url,\n // if it's relative call, we'll treat it as app backend call. \n return this.config.loginResource;\n } // if not the app's own backend or not a domain listed in the endpoints structure\n\n\n return null;\n };\n /**\n * Strips the protocol part of the URL and returns it.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._getHostFromUri = function (uri) {\n // remove http:// or https:// from uri\n var extractedUri = String(uri).replace(/^(https?:)\\/\\//, '');\n extractedUri = extractedUri.split('/')[0];\n return extractedUri;\n };\n /**\n * This method must be called for processing the response received from AAD. It extracts the hash, processes the token or error, saves it in the cache and calls the registered callbacks with the result.\n * @param {string} [hash=window.location.hash] - Hash fragment of Url.\n */\n\n\n _AuthenticationContext.prototype.handleWindowCallback = function (hash) {\n // This is for regular javascript usage for redirect handling\n // need to make sure this is for callback\n if (hash == null) {\n hash = window.location.hash;\n }\n\n if (this.isCallback(hash)) {\n var self = null;\n var isPopup = false;\n\n if (this._openedWindows.length > 0 && this._openedWindows[this._openedWindows.length - 1].opener && this._openedWindows[this._openedWindows.length - 1].opener._adalInstance) {\n self = this._openedWindows[this._openedWindows.length - 1].opener._adalInstance;\n isPopup = true;\n } else if (window.parent && window.parent._adalInstance) {\n self = window.parent._adalInstance;\n }\n\n var requestInfo = self.getRequestInfo(hash);\n var token,\n tokenReceivedCallback,\n tokenType = null;\n\n if (isPopup || window.parent !== window) {\n tokenReceivedCallback = self._callBackMappedToRenewStates[requestInfo.stateResponse];\n } else {\n tokenReceivedCallback = self.callback;\n }\n\n self.info(\"Returned from redirect url\");\n self.saveTokenFromHash(requestInfo);\n\n if (requestInfo.requestType === this.REQUEST_TYPE.RENEW_TOKEN && window.parent) {\n if (window.parent !== window) {\n self.verbose(\"Window is in iframe, acquiring token silently\");\n } else {\n self.verbose(\"acquiring token interactive in progress\");\n }\n\n token = requestInfo.parameters[self.CONSTANTS.ACCESS_TOKEN] || requestInfo.parameters[self.CONSTANTS.ID_TOKEN];\n tokenType = self.CONSTANTS.ACCESS_TOKEN;\n } else if (requestInfo.requestType === this.REQUEST_TYPE.LOGIN) {\n token = requestInfo.parameters[self.CONSTANTS.ID_TOKEN];\n tokenType = self.CONSTANTS.ID_TOKEN;\n }\n\n var errorDesc = requestInfo.parameters[self.CONSTANTS.ERROR_DESCRIPTION];\n var error = requestInfo.parameters[self.CONSTANTS.ERROR];\n\n try {\n if (tokenReceivedCallback) {\n tokenReceivedCallback(errorDesc, token, error, tokenType);\n }\n } catch (err) {\n self.error(\"Error occurred in user defined callback function: \" + err);\n }\n\n if (window.parent === window && !isPopup) {\n if (self.config.navigateToLoginRequestUrl) {\n window.location.href = self._getItem(self.CONSTANTS.STORAGE.LOGIN_REQUEST);\n } else window.location.hash = '';\n }\n }\n };\n /**\n * Constructs the authorization endpoint URL and returns it.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._getNavigateUrl = function (responseType, resource) {\n var tenant = 'common';\n\n if (this.config.tenant) {\n tenant = this.config.tenant;\n }\n\n var urlNavigate = this.instance + tenant + '/oauth2/authorize' + this._serialize(responseType, this.config, resource) + this._addLibMetadata();\n\n this.info('Navigate url:' + urlNavigate);\n return urlNavigate;\n };\n /**\n * Returns the decoded id_token.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._extractIdToken = function (encodedIdToken) {\n // id token will be decoded to get the username\n var decodedToken = this._decodeJwt(encodedIdToken);\n\n if (!decodedToken) {\n return null;\n }\n\n try {\n var base64IdToken = decodedToken.JWSPayload;\n\n var base64Decoded = this._base64DecodeStringUrlSafe(base64IdToken);\n\n if (!base64Decoded) {\n this.info('The returned id_token could not be base64 url safe decoded.');\n return null;\n } // ECMA script has JSON built-in support\n\n\n return JSON.parse(base64Decoded);\n } catch (err) {\n this.error('The returned id_token could not be decoded', err);\n }\n\n return null;\n };\n /**\n * Decodes a string of data which has been encoded using base-64 encoding.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._base64DecodeStringUrlSafe = function (base64IdToken) {\n // html5 should support atob function for decoding\n base64IdToken = base64IdToken.replace(/-/g, '+').replace(/_/g, '/');\n\n if (window.atob) {\n return decodeURIComponent(escape(window.atob(base64IdToken))); // jshint ignore:line\n } else {\n return decodeURIComponent(escape(this._decode(base64IdToken)));\n }\n }; //Take https://cdnjs.cloudflare.com/ajax/libs/Base64/0.3.0/base64.js and https://en.wikipedia.org/wiki/Base64 as reference. \n\n\n _AuthenticationContext.prototype._decode = function (base64IdToken) {\n var codes = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n base64IdToken = String(base64IdToken).replace(/=+$/, '');\n var length = base64IdToken.length;\n\n if (length % 4 === 1) {\n throw new Error('The token to be decoded is not correctly encoded.');\n }\n\n var h1,\n h2,\n h3,\n h4,\n bits,\n c1,\n c2,\n c3,\n decoded = '';\n\n for (var i = 0; i < length; i += 4) {\n //Every 4 base64 encoded character will be converted to 3 byte string, which is 24 bits\n // then 6 bits per base64 encoded character\n h1 = codes.indexOf(base64IdToken.charAt(i));\n h2 = codes.indexOf(base64IdToken.charAt(i + 1));\n h3 = codes.indexOf(base64IdToken.charAt(i + 2));\n h4 = codes.indexOf(base64IdToken.charAt(i + 3)); // For padding, if last two are '='\n\n if (i + 2 === length - 1) {\n bits = h1 << 18 | h2 << 12 | h3 << 6;\n c1 = bits >> 16 & 255;\n c2 = bits >> 8 & 255;\n decoded += String.fromCharCode(c1, c2);\n break;\n } // if last one is '='\n else if (i + 1 === length - 1) {\n bits = h1 << 18 | h2 << 12;\n c1 = bits >> 16 & 255;\n decoded += String.fromCharCode(c1);\n break;\n }\n\n bits = h1 << 18 | h2 << 12 | h3 << 6 | h4; // then convert to 3 byte chars\n\n c1 = bits >> 16 & 255;\n c2 = bits >> 8 & 255;\n c3 = bits & 255;\n decoded += String.fromCharCode(c1, c2, c3);\n }\n\n return decoded;\n };\n /**\n * Decodes an id token into an object with header, payload and signature fields.\n * @ignore\n */\n // Adal.node js crack function\n\n\n _AuthenticationContext.prototype._decodeJwt = function (jwtToken) {\n if (this._isEmpty(jwtToken)) {\n return null;\n }\n\n ;\n var idTokenPartsRegex = /^([^\\.\\s]*)\\.([^\\.\\s]+)\\.([^\\.\\s]*)$/;\n var matches = idTokenPartsRegex.exec(jwtToken);\n\n if (!matches || matches.length < 4) {\n this.warn('The returned id_token is not parseable.');\n return null;\n }\n\n var crackedToken = {\n header: matches[1],\n JWSPayload: matches[2],\n JWSSig: matches[3]\n };\n return crackedToken;\n };\n /**\n * Converts string to represent binary data in ASCII string format by translating it into a radix-64 representation and returns it\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._convertUrlSafeToRegularBase64EncodedString = function (str) {\n return str.replace('-', '+').replace('_', '/');\n };\n /**\n * Serializes the parameters for the authorization endpoint URL and returns the serialized uri string.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._serialize = function (responseType, obj, resource) {\n var str = [];\n\n if (obj !== null) {\n str.push('?response_type=' + responseType);\n str.push('client_id=' + encodeURIComponent(obj.clientId));\n\n if (resource) {\n str.push('resource=' + encodeURIComponent(resource));\n }\n\n str.push('redirect_uri=' + encodeURIComponent(obj.redirectUri));\n str.push('state=' + encodeURIComponent(obj.state));\n\n if (obj.hasOwnProperty('slice')) {\n str.push('slice=' + encodeURIComponent(obj.slice));\n }\n\n if (obj.hasOwnProperty('extraQueryParameter')) {\n str.push(obj.extraQueryParameter);\n }\n\n var correlationId = obj.correlationId ? obj.correlationId : this._guid();\n str.push('client-request-id=' + encodeURIComponent(correlationId));\n }\n\n return str.join('&');\n };\n /**\n * Parses the query string parameters into a key-value pair object.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._deserialize = function (query) {\n var match,\n pl = /\\+/g,\n // Regex for replacing addition symbol with a space\n search = /([^&=]+)=([^&]*)/g,\n decode = function decode(s) {\n return decodeURIComponent(s.replace(pl, ' '));\n },\n obj = {};\n\n match = search.exec(query);\n\n while (match) {\n obj[decode(match[1])] = decode(match[2]);\n match = search.exec(query);\n }\n\n return obj;\n };\n /**\n * Converts decimal value to hex equivalent\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._decimalToHex = function (number) {\n var hex = number.toString(16);\n\n while (hex.length < 2) {\n hex = '0' + hex;\n }\n\n return hex;\n };\n /**\n * Generates RFC4122 version 4 guid (128 bits)\n * @ignore\n */\n\n /* jshint ignore:start */\n\n\n _AuthenticationContext.prototype._guid = function () {\n // RFC4122: The version 4 UUID is meant for generating UUIDs from truly-random or\n // pseudo-random numbers.\n // The algorithm is as follows:\n // Set the two most significant bits (bits 6 and 7) of the\n // clock_seq_hi_and_reserved to zero and one, respectively.\n // Set the four most significant bits (bits 12 through 15) of the\n // time_hi_and_version field to the 4-bit version number from\n // Section 4.1.3. Version4\n // Set all the other bits to randomly (or pseudo-randomly) chosen\n // values.\n // UUID = time-low \"-\" time-mid \"-\"time-high-and-version \"-\"clock-seq-reserved and low(2hexOctet)\"-\" node\n // time-low = 4hexOctet\n // time-mid = 2hexOctet\n // time-high-and-version = 2hexOctet\n // clock-seq-and-reserved = hexOctet:\n // clock-seq-low = hexOctet\n // node = 6hexOctet\n // Format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\n // y could be 1000, 1001, 1010, 1011 since most significant two bits needs to be 10\n // y values are 8, 9, A, B\n var cryptoObj = window.crypto || window.msCrypto; // for IE 11\n\n if (cryptoObj && cryptoObj.getRandomValues) {\n var buffer = new Uint8Array(16);\n cryptoObj.getRandomValues(buffer); //buffer[6] and buffer[7] represents the time_hi_and_version field. We will set the four most significant bits (4 through 7) of buffer[6] to represent decimal number 4 (UUID version number).\n\n buffer[6] |= 0x40; //buffer[6] | 01000000 will set the 6 bit to 1.\n\n buffer[6] &= 0x4f; //buffer[6] & 01001111 will set the 4, 5, and 7 bit to 0 such that bits 4-7 == 0100 = \"4\".\n //buffer[8] represents the clock_seq_hi_and_reserved field. We will set the two most significant bits (6 and 7) of the clock_seq_hi_and_reserved to zero and one, respectively.\n\n buffer[8] |= 0x80; //buffer[8] | 10000000 will set the 7 bit to 1.\n\n buffer[8] &= 0xbf; //buffer[8] & 10111111 will set the 6 bit to 0.\n\n return this._decimalToHex(buffer[0]) + this._decimalToHex(buffer[1]) + this._decimalToHex(buffer[2]) + this._decimalToHex(buffer[3]) + '-' + this._decimalToHex(buffer[4]) + this._decimalToHex(buffer[5]) + '-' + this._decimalToHex(buffer[6]) + this._decimalToHex(buffer[7]) + '-' + this._decimalToHex(buffer[8]) + this._decimalToHex(buffer[9]) + '-' + this._decimalToHex(buffer[10]) + this._decimalToHex(buffer[11]) + this._decimalToHex(buffer[12]) + this._decimalToHex(buffer[13]) + this._decimalToHex(buffer[14]) + this._decimalToHex(buffer[15]);\n } else {\n var guidHolder = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n var hex = '0123456789abcdef';\n var r = 0;\n var guidResponse = \"\";\n\n for (var i = 0; i < 36; i++) {\n if (guidHolder[i] !== '-' && guidHolder[i] !== '4') {\n // each x and y needs to be random\n r = Math.random() * 16 | 0;\n }\n\n if (guidHolder[i] === 'x') {\n guidResponse += hex[r];\n } else if (guidHolder[i] === 'y') {\n // clock-seq-and-reserved first hex is filtered and remaining hex values are random\n r &= 0x3; // bit and with 0011 to set pos 2 to zero ?0??\n\n r |= 0x8; // set pos 3 to 1 as 1???\n\n guidResponse += hex[r];\n } else {\n guidResponse += guidHolder[i];\n }\n }\n\n return guidResponse;\n }\n };\n /* jshint ignore:end */\n\n /**\n * Calculates the expires in value in milliseconds for the acquired token\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._expiresIn = function (expires) {\n // if AAD did not send \"expires_in\" property, use default expiration of 3599 seconds, for some reason AAD sends 3599 as \"expires_in\" value instead of 3600\n if (!expires) expires = 3599;\n return this._now() + parseInt(expires, 10);\n };\n /**\n * Return the number of milliseconds since 1970/01/01\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._now = function () {\n return Math.round(new Date().getTime() / 1000.0);\n };\n /**\n * Adds the hidden iframe for silent token renewal\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._addAdalFrame = function (iframeId) {\n if (typeof iframeId === 'undefined') {\n return;\n }\n\n this.info('Add adal frame to document:' + iframeId);\n var adalFrame = document.getElementById(iframeId);\n\n if (!adalFrame) {\n if (document.createElement && document.documentElement && (window.opera || window.navigator.userAgent.indexOf('MSIE 5.0') === -1)) {\n var ifr = document.createElement('iframe');\n ifr.setAttribute('id', iframeId);\n ifr.setAttribute('aria-hidden', 'true');\n ifr.style.visibility = 'hidden';\n ifr.style.position = 'absolute';\n ifr.style.width = ifr.style.height = ifr.borderWidth = '0px';\n adalFrame = document.getElementsByTagName('body')[0].appendChild(ifr);\n } else if (document.body && document.body.insertAdjacentHTML) {\n document.body.insertAdjacentHTML('beforeEnd', '');\n }\n\n if (window.frames && window.frames[iframeId]) {\n adalFrame = window.frames[iframeId];\n }\n }\n\n return adalFrame;\n };\n /**\n * Saves the key-value pair in the cache\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._saveItem = function (key, obj, preserve) {\n if (this.config && this.config.cacheLocation && this.config.cacheLocation === 'localStorage') {\n if (!this._supportsLocalStorage()) {\n this.info('Local storage is not supported');\n return false;\n }\n\n if (preserve) {\n var value = this._getItem(key) || '';\n localStorage.setItem(key, value + obj + this.CONSTANTS.CACHE_DELIMETER);\n } else {\n localStorage.setItem(key, obj);\n }\n\n return true;\n } // Default as session storage\n\n\n if (!this._supportsSessionStorage()) {\n this.info('Session storage is not supported');\n return false;\n }\n\n sessionStorage.setItem(key, obj);\n return true;\n };\n /**\n * Searches the value for the given key in the cache\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._getItem = function (key) {\n if (this.config && this.config.cacheLocation && this.config.cacheLocation === 'localStorage') {\n if (!this._supportsLocalStorage()) {\n this.info('Local storage is not supported');\n return null;\n }\n\n return localStorage.getItem(key);\n } // Default as session storage\n\n\n if (!this._supportsSessionStorage()) {\n this.info('Session storage is not supported');\n return null;\n }\n\n return sessionStorage.getItem(key);\n };\n /**\n * Returns true if browser supports localStorage, false otherwise.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._supportsLocalStorage = function () {\n try {\n if (!window.localStorage) return false; // Test availability\n\n window.localStorage.setItem('storageTest', 'A'); // Try write\n\n if (window.localStorage.getItem('storageTest') != 'A') return false; // Test read/write\n\n window.localStorage.removeItem('storageTest'); // Try delete\n\n if (window.localStorage.getItem('storageTest')) return false; // Test delete\n\n return true; // Success\n } catch (e) {\n return false;\n }\n };\n /**\n * Returns true if browser supports sessionStorage, false otherwise.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._supportsSessionStorage = function () {\n try {\n if (!window.sessionStorage) return false; // Test availability\n\n window.sessionStorage.setItem('storageTest', 'A'); // Try write\n\n if (window.sessionStorage.getItem('storageTest') != 'A') return false; // Test read/write\n\n window.sessionStorage.removeItem('storageTest'); // Try delete\n\n if (window.sessionStorage.getItem('storageTest')) return false; // Test delete\n\n return true; // Success\n } catch (e) {\n return false;\n }\n };\n /**\n * Returns a cloned copy of the passed object.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._cloneConfig = function (obj) {\n if (null === obj || 'object' !== _typeof(obj)) {\n return obj;\n }\n\n var copy = {};\n\n for (var attr in obj) {\n if (obj.hasOwnProperty(attr)) {\n copy[attr] = obj[attr];\n }\n }\n\n return copy;\n };\n /**\n * Adds the library version and returns it.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._addLibMetadata = function () {\n // x-client-SKU\n // x-client-Ver\n return '&x-client-SKU=Js&x-client-Ver=' + this._libVersion();\n };\n /**\n * Checks the Logging Level, constructs the Log message and logs it. Users need to implement/override this method to turn on Logging. \n * @param {number} level - Level can be set 0,1,2 and 3 which turns on 'error', 'warning', 'info' or 'verbose' level logging respectively.\n * @param {string} message - Message to log.\n * @param {string} error - Error to log.\n */\n\n\n _AuthenticationContext.prototype.log = function (level, message, error, containsPii) {\n if (level <= Logging.level) {\n if (!Logging.piiLoggingEnabled && containsPii) return;\n var timestamp = new Date().toUTCString();\n var formattedMessage = '';\n if (this.config.correlationId) formattedMessage = timestamp + ':' + this.config.correlationId + '-' + this._libVersion() + '-' + this.CONSTANTS.LEVEL_STRING_MAP[level] + ' ' + message;else formattedMessage = timestamp + ':' + this._libVersion() + '-' + this.CONSTANTS.LEVEL_STRING_MAP[level] + ' ' + message;\n\n if (error) {\n formattedMessage += '\\nstack:\\n' + error.stack;\n }\n\n Logging.log(formattedMessage);\n }\n };\n /**\n * Logs messages when Logging Level is set to 0.\n * @param {string} message - Message to log.\n * @param {string} error - Error to log.\n */\n\n\n _AuthenticationContext.prototype.error = function (message, error) {\n this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR, message, error);\n };\n /**\n * Logs messages when Logging Level is set to 1.\n * @param {string} message - Message to log.\n */\n\n\n _AuthenticationContext.prototype.warn = function (message) {\n this.log(this.CONSTANTS.LOGGING_LEVEL.WARN, message, null);\n };\n /**\n * Logs messages when Logging Level is set to 2.\n * @param {string} message - Message to log.\n */\n\n\n _AuthenticationContext.prototype.info = function (message) {\n this.log(this.CONSTANTS.LOGGING_LEVEL.INFO, message, null);\n };\n /**\n * Logs messages when Logging Level is set to 3.\n * @param {string} message - Message to log.\n */\n\n\n _AuthenticationContext.prototype.verbose = function (message) {\n this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE, message, null);\n };\n /**\n * Logs Pii messages when Logging Level is set to 0 and window.piiLoggingEnabled is set to true.\n * @param {string} message - Message to log.\n * @param {string} error - Error to log.\n */\n\n\n _AuthenticationContext.prototype.errorPii = function (message, error) {\n this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR, message, error, true);\n };\n /**\n * Logs Pii messages when Logging Level is set to 1 and window.piiLoggingEnabled is set to true.\n * @param {string} message - Message to log.\n */\n\n\n _AuthenticationContext.prototype.warnPii = function (message) {\n this.log(this.CONSTANTS.LOGGING_LEVEL.WARN, message, null, true);\n };\n /**\n * Logs messages when Logging Level is set to 2 and window.piiLoggingEnabled is set to true.\n * @param {string} message - Message to log.\n */\n\n\n _AuthenticationContext.prototype.infoPii = function (message) {\n this.log(this.CONSTANTS.LOGGING_LEVEL.INFO, message, null, true);\n };\n /**\n * Logs messages when Logging Level is set to 3 and window.piiLoggingEnabled is set to true.\n * @param {string} message - Message to log.\n */\n\n\n _AuthenticationContext.prototype.verbosePii = function (message) {\n this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE, message, null, true);\n };\n /**\n * Returns the library version.\n * @ignore\n */\n\n\n _AuthenticationContext.prototype._libVersion = function () {\n return '1.0.18';\n };\n /**\n * Returns a reference of Authentication Context as a result of a require call.\n * @ignore\n */\n\n\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = _AuthenticationContext;\n\n module.exports.inject = function (conf) {\n return new _AuthenticationContext(conf);\n };\n }\n\n return _AuthenticationContext;\n}();","import { uuid4, dateTimestampInSeconds, consoleSandbox, logger, GLOBAL_OBJ, getGlobalSingleton } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { Scope } from './scope.js';\nimport { closeSession, makeSession, updateSession } from './session.js';\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nconst API_VERSION = 4;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * @inheritDoc\n */\nclass Hub {\n /** Is a {@link Layer}[] containing the client and scope */\n\n /** Contains the last event id of a captured event. */\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n constructor(client, scope = new Scope(), _version = API_VERSION) {this._version = _version;\n this._stack = [{ scope }];\n if (client) {\n this.bindClient(client);\n }\n }\n\n /**\n * @inheritDoc\n */\n isOlderThan(version) {\n return this._version < version;\n }\n\n /**\n * @inheritDoc\n */\n bindClient(client) {\n const top = this.getStackTop();\n top.client = client;\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n }\n\n /**\n * @inheritDoc\n */\n pushScope() {\n // We want to clone the content of prev scope\n const scope = Scope.clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n */\n popScope() {\n if (this.getStack().length <= 1) return false;\n return !!this.getStack().pop();\n }\n\n /**\n * @inheritDoc\n */\n withScope(callback) {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n }\n\n /**\n * @inheritDoc\n */\n getClient() {\n return this.getStackTop().client ;\n }\n\n /** Returns the scope of the top stack. */\n getScope() {\n return this.getStackTop().scope;\n }\n\n /** Returns the scope stack for domains or the process. */\n getStack() {\n return this._stack;\n }\n\n /** Returns the topmost scope layer in the order domain > local > process. */\n getStackTop() {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n captureException(exception, hint) {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error('Sentry syntheticException');\n this._withClient((client, scope) => {\n client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n scope,\n );\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n level,\n hint,\n ) {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error(message);\n this._withClient((client, scope) => {\n client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n scope,\n );\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureEvent(event, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n if (!event.type) {\n this._lastEventId = eventId;\n }\n\n this._withClient((client, scope) => {\n client.captureEvent(event, { ...hint, event_id: eventId }, scope);\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n lastEventId() {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n addBreadcrumb(breadcrumb, hint) {\n const { scope, client } = this.getStackTop();\n\n if (!client) return;\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (client.getOptions && client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) )\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n if (client.emit) {\n client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n }\n\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n }\n\n /**\n * @inheritDoc\n */\n setUser(user) {\n this.getScope().setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n setTags(tags) {\n this.getScope().setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n setExtras(extras) {\n this.getScope().setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this.getScope().setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n setExtra(key, extra) {\n this.getScope().setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setContext(name, context) {\n this.getScope().setContext(name, context);\n }\n\n /**\n * @inheritDoc\n */\n configureScope(callback) {\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n run(callback) {\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n */\n getIntegration(integration) {\n const client = this.getClient();\n if (!client) return null;\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n startTransaction(context, customSamplingContext) {\n const result = this._callExtensionMethod('startTransaction', context, customSamplingContext);\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && !result) {\n const client = this.getClient();\n if (!client) {\n // eslint-disable-next-line no-console\n console.warn(\n \"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'\",\n );\n } else {\n // eslint-disable-next-line no-console\n console.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n`);\n }\n }\n\n return result;\n }\n\n /**\n * @inheritDoc\n */\n traceHeaders() {\n return this._callExtensionMethod('traceHeaders');\n }\n\n /**\n * @inheritDoc\n */\n captureSession(endSession = false) {\n // both send the update and pull the session from the scope\n if (endSession) {\n return this.endSession();\n }\n\n // only send the update\n this._sendSessionUpdate();\n }\n\n /**\n * @inheritDoc\n */\n endSession() {\n const layer = this.getStackTop();\n const scope = layer.scope;\n const session = scope.getSession();\n if (session) {\n closeSession(session);\n }\n this._sendSessionUpdate();\n\n // the session is over; take it off of the scope\n scope.setSession();\n }\n\n /**\n * @inheritDoc\n */\n startSession(context) {\n const { scope, client } = this.getStackTop();\n const { release, environment = DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n const session = makeSession({\n release,\n environment,\n user: scope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n updateSession(currentSession, { status: 'exited' });\n }\n this.endSession();\n\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n\n return session;\n }\n\n /**\n * Returns if default PII should be sent to Sentry and propagated in ourgoing requests\n * when Tracing is used.\n */\n shouldSendDefaultPii() {\n const client = this.getClient();\n const options = client && client.getOptions();\n return Boolean(options && options.sendDefaultPii);\n }\n\n /**\n * Sends the current Session on the scope\n */\n _sendSessionUpdate() {\n const { scope, client } = this.getStackTop();\n\n const session = scope.getSession();\n if (session && client && client.captureSession) {\n client.captureSession(session);\n }\n }\n\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n _withClient(callback) {\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(client, scope);\n }\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _callExtensionMethod(method, ...args) {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nfunction getMainCarrier() {\n GLOBAL_OBJ.__SENTRY__ = GLOBAL_OBJ.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return GLOBAL_OBJ;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nfunction makeMain(hub) {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nfunction getCurrentHub() {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n const hub = registry.__SENTRY__.acs.getCurrentHub();\n\n if (hub) {\n return hub;\n }\n }\n\n // Return hub that lives on a global object\n return getGlobalHub(registry);\n}\n\nfunction getGlobalHub(registry = getMainCarrier()) {\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * If the carrier does not contain a hub, a new hub is created with the global hub client and scope.\n */\nfunction ensureHubOnCarrier(carrier, parent = getGlobalHub()) {\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(carrier) || getHubFromCarrier(carrier).isOlderThan(API_VERSION)) {\n const globalHubTopStack = parent.getStackTop();\n setHubOnCarrier(carrier, new Hub(globalHubTopStack.client, Scope.clone(globalHubTopStack.scope)));\n }\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nfunction setAsyncContextStrategy(strategy) {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n registry.__SENTRY__ = registry.__SENTRY__ || {};\n registry.__SENTRY__.acs = strategy;\n}\n\n/**\n * Runs the supplied callback in its own async context. Async Context strategies are defined per SDK.\n *\n * @param callback The callback to run in its own async context\n * @param options Options to pass to the async context strategy\n * @returns The result of the callback\n */\nfunction runWithAsyncContext(callback, options = {}) {\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n return registry.__SENTRY__.acs.runWithAsyncContext(callback, options);\n }\n\n // if there was no strategy, fallback to just calling the callback\n return callback();\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nfunction getHubFromCarrier(carrier) {\n return getGlobalSingleton('hub', () => new Hub(), carrier);\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */\nfunction setHubOnCarrier(carrier, hub) {\n if (!carrier) return false;\n const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n __SENTRY__.hub = hub;\n return true;\n}\n\nexport { API_VERSION, Hub, ensureHubOnCarrier, getCurrentHub, getHubFromCarrier, getMainCarrier, makeMain, runWithAsyncContext, setAsyncContextStrategy, setHubOnCarrier };\n//# sourceMappingURL=hub.js.map\n","import { GLOBAL_OBJ } from './worldwide.js';\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\nconst CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] ;\n\n/** This may be mutated by the console instrumentation. */\nconst originalConsoleMethods\n\n = {};\n\n/** JSDoc */\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nfunction consoleSandbox(callback) {\n if (!('console' in GLOBAL_OBJ)) {\n return callback();\n }\n\n const console = GLOBAL_OBJ.console ;\n const wrappedFuncs = {};\n\n const wrappedLevels = Object.keys(originalConsoleMethods) ;\n\n // Restore all wrapped console methods\n wrappedLevels.forEach(level => {\n const originalConsoleMethod = originalConsoleMethods[level] ;\n wrappedFuncs[level] = console[level] ;\n console[level] = originalConsoleMethod;\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n wrappedLevels.forEach(level => {\n console[level] = wrappedFuncs[level] ;\n });\n }\n}\n\nfunction makeLogger() {\n let enabled = false;\n const logger = {\n enable: () => {\n enabled = true;\n },\n disable: () => {\n enabled = false;\n },\n };\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n CONSOLE_LEVELS.forEach(name => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logger[name] = (...args) => {\n if (enabled) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = () => undefined;\n });\n }\n\n return logger ;\n}\n\nconst logger = makeLogger();\n\nexport { CONSOLE_LEVELS, consoleSandbox, logger, originalConsoleMethods };\n//# sourceMappingURL=logger.js.map\n","// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isError(wat) {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat, className) {\n return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isErrorEvent(wat) {\n return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMError(wat) {\n return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMException(wat) {\n return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isString(wat) {\n return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPrimitive(wat) {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPlainObject(wat) {\n return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isRegExp(wat) {\n return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nfunction isThenable(wat) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isSyntheticEvent(wat) {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value is NaN\n * {@link isNaN}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isNaN(wat) {\n return typeof wat === 'number' && wat !== wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nfunction isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n\nexport { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isNaN, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable };\n//# sourceMappingURL=is.js.map\n","/** Internal global with common properties and Sentry extensions */\n\n// The code below for 'isGlobalObj' and 'GLOBAL_OBJ' was copied from core-js before modification\n// https://github.com/zloirock/core-js/blob/1b944df55282cdc99c90db5f49eb0b6eda2cc0a3/packages/core-js/internals/global.js\n// core-js has the following licence:\n//\n// Copyright (c) 2014-2022 Denis Pushkarev\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/** Returns 'obj' if it's the global object, otherwise returns undefined */\nfunction isGlobalObj(obj) {\n return obj && obj.Math == Math ? obj : undefined;\n}\n\n/** Get's the global object for the current JavaScript runtime */\nconst GLOBAL_OBJ =\n (typeof globalThis == 'object' && isGlobalObj(globalThis)) ||\n // eslint-disable-next-line no-restricted-globals\n (typeof window == 'object' && isGlobalObj(window)) ||\n (typeof self == 'object' && isGlobalObj(self)) ||\n (typeof global == 'object' && isGlobalObj(global)) ||\n (function () {\n return this;\n })() ||\n {};\n\n/**\n * @deprecated Use GLOBAL_OBJ instead or WINDOW from @sentry/browser. This will be removed in v8\n */\nfunction getGlobalObject() {\n return GLOBAL_OBJ ;\n}\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nfunction getGlobalSingleton(name, creator, obj) {\n const gbl = (obj || GLOBAL_OBJ) ;\n const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}\n\nexport { GLOBAL_OBJ, getGlobalObject, getGlobalSingleton };\n//# sourceMappingURL=worldwide.js.map\n","import { htmlTreeAsString } from './browser.js';\nimport { isError, isEvent, isInstanceOf, isElement, isPlainObject, isPrimitive } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, )` or `origMethod.apply(this, [])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nfunction fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] ;\n const wrapped = replacementFactory(original) ;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n try {\n markFunctionWrapped(wrapped, original);\n } catch (_Oo) {\n // This can throw if multiple fill happens on a global object like XMLHttpRequest\n // Fixes https://github.com/getsentry/sentry-javascript/issues/2043\n }\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nfunction addNonEnumerableProperty(obj, name, value) {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nfunction markFunctionWrapped(wrapped, original) {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\nfunction getOriginalFunction(func) {\n return func.__sentry_original__;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nfunction urlEncode(object) {\n return Object.keys(object)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`)\n .join('&');\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor\n * an Error.\n */\nfunction convertToPlainObject(value)\n\n {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value),\n };\n } else if (isEvent(value)) {\n const newObj\n\n = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value),\n };\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target) {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj) {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = (obj )[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nfunction extractExceptionKeysForMessage(exception, maxLength = 40) {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nfunction dropUndefinedKeys(inputValue) {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue, memoizationMap) {\n if (isPlainObject(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n for (const key of Object.keys(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n\n return returnValue ;\n }\n\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n inputValue.forEach((item) => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n\n return returnValue ;\n }\n\n return inputValue;\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nfunction objectify(wat) {\n let objectified;\n switch (true) {\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new (wat ).constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n\nexport { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, urlEncode };\n//# sourceMappingURL=object.js.map\n","import { addNonEnumerableProperty } from './object.js';\nimport { snipLine } from './string.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nfunction uuid4() {\n const gbl = GLOBAL_OBJ ;\n const crypto = gbl.crypto || gbl.msCrypto;\n\n if (crypto && crypto.randomUUID) {\n return crypto.randomUUID().replace(/-/g, '');\n }\n\n const getRandomByte =\n crypto && crypto.getRandomValues ? () => crypto.getRandomValues(new Uint8Array(1))[0] : () => Math.random() * 16;\n\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n return (([1e7] ) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c =>\n // eslint-disable-next-line no-bitwise\n ((c ) ^ ((getRandomByte() & 15) >> ((c ) / 4))).toString(16),\n );\n}\n\nfunction getFirstException(event) {\n return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nfunction getEventDescription(event) {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '';\n }\n return eventId || '';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nfunction addExceptionTypeValue(event, value, type) {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nfunction addExceptionMechanism(event, newMechanism) {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nfunction parseSemver(input) {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nfunction addContextToFrame(lines, frame, linesOfContext = 5) {\n // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n if (frame.lineno === undefined) {\n return;\n }\n\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line) => snipLine(line, 0));\n\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line) => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nfunction checkOrSetAlreadyCaught(exception) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (exception && (exception ).__sentry_captured__) {\n return true;\n }\n\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n addNonEnumerableProperty(exception , '__sentry_captured__', true);\n } catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n\n return false;\n}\n\n/**\n * Checks whether the given input is already an array, and if it isn't, wraps it in one.\n *\n * @param maybeArray Input to turn into an array, if necessary\n * @returns The input, if already an array, or an array with the input as the only element, if not\n */\nfunction arrayify(maybeArray) {\n return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n\nexport { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, arrayify, checkOrSetAlreadyCaught, getEventDescription, parseSemver, uuid4 };\n//# sourceMappingURL=misc.js.map\n","import { runWithAdal } from 'react-adal';\nimport { getAuthContext, IS_LOGIN_NOT_REQUIRED } from './auth';\n\nlet localVersion;\nfunction loadApp() { }\nfunction sleep(ms) {\n return new Promise(resolve => setTimeout(resolve, ms)); // eslint-disable-line\n}\n(function checkVersion() {\n const headers = new Headers();\n headers.append('pragma', 'no-cache');\n headers.append('cache-control', 'no-cache, no-store');\n\n fetch('/version.json', { cache: 'no-cache', redirect: 'follow', headers })\n .then((response) => {\n if (response.ok) {\n return response.json();\n }\n return Promise.reject(new Error('Failed to fatch Version'));\n })\n .then((versionObj) => {\n const version = versionObj.releaseVersion;\n if (!localVersion) {\n localVersion = version;\n } else if (version !== localVersion) {\n // TODO: use existing styled Banner to show this\n // eslint-disable-next-line no-alert\n const r = window.confirm(`A new version ${version} is found, click OK to refresh now or cancel to reload the page later`);\n if (r === true) {\n window.location.reload();\n }\n return true;\n }\n return false;\n })\n .then((stopChecking) => {\n if (!stopChecking) {\n sleep(1000 * 60).then(checkVersion);\n }\n })\n .catch(() => sleep(1000 * 60).then(checkVersion));\n}());\nrunWithAdal(getAuthContext(), loadApp, IS_LOGIN_NOT_REQUIRED);\n","import { logger, uuid4 } from '@sentry/utils';\nimport { getCurrentHub } from './hub.js';\n\n// Note: All functions in this file are typed with a return value of `ReturnType`,\n// where HUB_FUNCTION is some method on the Hub class.\n//\n// This is done to make sure the top level SDK methods stay in sync with the hub methods.\n// Although every method here has an explicit return type, some of them (that map to void returns) do not\n// contain `return` keywords. This is done to save on bundle size, as `return` is not minifiable.\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param captureContext Additional scope data to apply to exception event.\n * @returns The generated eventId.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nfunction captureException(exception, captureContext) {\n return getCurrentHub().captureException(exception, { captureContext });\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param Severity Define the level of the message.\n * @returns The generated eventId.\n */\nfunction captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n captureContext,\n) {\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n return getCurrentHub().captureMessage(message, level, context);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nfunction captureEvent(event, hint) {\n return getCurrentHub().captureEvent(event, hint);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nfunction configureScope(callback) {\n getCurrentHub().configureScope(callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nfunction addBreadcrumb(breadcrumb) {\n getCurrentHub().addBreadcrumb(breadcrumb);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setContext(name, context) {\n getCurrentHub().setContext(name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nfunction setExtras(extras) {\n getCurrentHub().setExtras(extras);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nfunction setExtra(key, extra) {\n getCurrentHub().setExtra(key, extra);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nfunction setTags(tags) {\n getCurrentHub().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nfunction setTag(key, value) {\n getCurrentHub().setTag(key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nfunction setUser(user) {\n getCurrentHub().setUser(user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nfunction withScope(callback) {\n getCurrentHub().withScope(callback);\n}\n\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * NOTE: This function should only be used for *manual* instrumentation. Auto-instrumentation should call\n * `startTransaction` directly on the hub.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n */\nfunction startTransaction(\n context,\n customSamplingContext,\n) {\n return getCurrentHub().startTransaction({ ...context }, customSamplingContext);\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction captureCheckIn(checkIn, upsertMonitorConfig) {\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const client = hub.getClient();\n if (!client) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot capture check-in. No client defined.');\n } else if (!client.captureCheckIn) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n } else {\n return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n }\n\n return uuid4();\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function flush(timeout) {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot flush events. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function close(timeout) {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nfunction lastEventId() {\n return getCurrentHub().lastEventId();\n}\n\nexport { addBreadcrumb, captureCheckIn, captureEvent, captureException, captureMessage, close, configureScope, flush, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope };\n//# sourceMappingURL=exports.js.map\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","import { isString, isRegExp } from './is.js';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nfunction truncate(str, max = 0) {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nfunction snipLine(line, colno) {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n output.push(String(value));\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nfunction isMatchingPattern(\n value,\n pattern,\n requireExactStringMatch = false,\n) {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n\n return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nfunction stringMatchesSomePattern(\n testString,\n patterns = [],\n requireExactStringMatch = false,\n) {\n return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch));\n}\n\nexport { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate };\n//# sourceMappingURL=string.js.map\n","import { timestampInSeconds, uuid4, dropUndefinedKeys } from '@sentry/utils';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nfunction makeSession(context) {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n\n const session = {\n sid: uuid4(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: 'ok',\n errors: 0,\n ignoreDuration: false,\n toJSON: () => sessionToJSON(session),\n };\n\n if (context) {\n updateSession(session, context);\n }\n\n return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see BaseClient.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nfunction updateSession(session, context = {}) {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) {\n session.ipAddress = context.user.ip_address;\n }\n\n if (!session.did && !context.did) {\n session.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n session.timestamp = context.timestamp || timestampInSeconds();\n\n if (context.ignoreDuration) {\n session.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n session.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n session.init = context.init;\n }\n if (!session.did && context.did) {\n session.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n session.started = context.started;\n }\n if (session.ignoreDuration) {\n session.duration = undefined;\n } else if (typeof context.duration === 'number') {\n session.duration = context.duration;\n } else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n session.release = context.release;\n }\n if (context.environment) {\n session.environment = context.environment;\n }\n if (!session.ipAddress && context.ipAddress) {\n session.ipAddress = context.ipAddress;\n }\n if (!session.userAgent && context.userAgent) {\n session.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n session.errors = context.errors;\n }\n if (context.status) {\n session.status = context.status;\n }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n * this function will keep the previously set status, unless it was `'ok'` in which case\n * it is changed to `'exited'`.\n */\nfunction closeSession(session, status) {\n let context = {};\n if (status) {\n context = { status };\n } else if (session.status === 'ok') {\n context = { status: 'exited' };\n }\n\n updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session) {\n return dropUndefinedKeys({\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1000).toISOString(),\n timestamp: new Date(session.timestamp * 1000).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n duration: session.duration,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent,\n },\n });\n}\n\nexport { closeSession, makeSession, updateSession };\n//# sourceMappingURL=session.js.map\n","import { isNodeEnv, dynamicRequire } from './node.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * An object that can return the current timestamp in seconds since the UNIX epoch.\n */\n\n/**\n * A TimestampSource implementation for environments that do not support the Performance Web API natively.\n *\n * Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier\n * than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It\n * is more obvious to explain \"why does my span have negative duration\" than \"why my spans have zero duration\".\n */\nconst dateTimestampSource = {\n nowSeconds: () => Date.now() / 1000,\n};\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction getBrowserPerformance() {\n const { performance } = WINDOW;\n if (!performance || !performance.now) {\n return undefined;\n }\n\n // Replace performance.timeOrigin with our own timeOrigin based on Date.now().\n //\n // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +\n // performance.now() gives a date arbitrarily in the past.\n //\n // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is\n // undefined.\n //\n // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to\n // interact with data coming out of performance entries.\n //\n // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that\n // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes\n // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have\n // observed skews that can be as long as days, weeks or months.\n //\n // See https://github.com/getsentry/sentry-javascript/issues/2590.\n //\n // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload\n // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation\n // transactions of long-lived web pages.\n const timeOrigin = Date.now() - performance.now();\n\n return {\n now: () => performance.now(),\n timeOrigin,\n };\n}\n\n/**\n * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't\n * implement the API.\n */\nfunction getNodePerformance() {\n try {\n const perfHooks = dynamicRequire(module, 'perf_hooks') ;\n return perfHooks.performance;\n } catch (_) {\n return undefined;\n }\n}\n\n/**\n * The Performance API implementation for the current platform, if available.\n */\nconst platformPerformance = isNodeEnv() ? getNodePerformance() : getBrowserPerformance();\n\nconst timestampSource =\n platformPerformance === undefined\n ? dateTimestampSource\n : {\n nowSeconds: () => (platformPerformance.timeOrigin + platformPerformance.now()) / 1000,\n };\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\nconst dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource);\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * See `usingPerformanceAPI` to test whether the Performance API is used.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nconst timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);\n\n/**\n * Re-exported with an old name for backwards-compatibility.\n * TODO (v8): Remove this\n *\n * @deprecated Use `timestampInSeconds` instead.\n */\nconst timestampWithMs = timestampInSeconds;\n\n/**\n * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.\n */\nconst usingPerformanceAPI = platformPerformance !== undefined;\n\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n */\nlet _browserPerformanceTimeOriginMode;\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nconst browserPerformanceTimeOrigin = (() => {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n\n const { performance } = WINDOW;\n if (!performance || !performance.now) {\n _browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n\n const threshold = 3600 * 1000;\n const performanceNow = performance.now();\n const dateNow = Date.now();\n\n // if timeOrigin isn't available set delta to threshold so it isn't used\n const timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n const timeOriginIsReliable = timeOriginDelta < threshold;\n\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n const navigationStart = performance.timing && performance.timing.navigationStart;\n const hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n const navigationStartIsReliable = navigationStartDelta < threshold;\n\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n _browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n } else {\n _browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\n }\n }\n\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n _browserPerformanceTimeOriginMode = 'dateNow';\n return dateNow;\n})();\n\nexport { _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds, timestampWithMs, usingPerformanceAPI };\n//# sourceMappingURL=time.js.map\n","import { isPlainObject, dateTimestampInSeconds, SyncPromise, logger, isThenable, arrayify, getGlobalSingleton, uuid4 } from '@sentry/utils';\nimport { updateSession } from './session.js';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nclass Scope {\n /** Flag if notifying is happening. */\n\n /** Callback for client to receive scope changes. */\n\n /** Callback list that will be called after {@link applyToEvent}. */\n\n /** Array of breadcrumbs. */\n\n /** User */\n\n /** Tags */\n\n /** Extra */\n\n /** Contexts */\n\n /** Attachments */\n\n /** Propagation Context for distributed tracing */\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n\n /** Fingerprint */\n\n /** Severity */\n // eslint-disable-next-line deprecation/deprecation\n\n /** Transaction Name */\n\n /** Span */\n\n /** Session */\n\n /** Request Mode Session Status */\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = generatePropagationContext();\n }\n\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n static clone(scope) {\n const newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = [...scope._breadcrumbs];\n newScope._tags = { ...scope._tags };\n newScope._extra = { ...scope._extra };\n newScope._contexts = { ...scope._contexts };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._session = scope._session;\n newScope._transactionName = scope._transactionName;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [...scope._eventProcessors];\n newScope._requestSession = scope._requestSession;\n newScope._attachments = [...scope._attachments];\n newScope._sdkProcessingMetadata = { ...scope._sdkProcessingMetadata };\n newScope._propagationContext = { ...scope._propagationContext };\n }\n return newScope;\n }\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n addEventProcessor(callback) {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setUser(user) {\n this._user = user || {};\n if (this._session) {\n updateSession(this._session, { user });\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getUser() {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n getRequestSession() {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n setRequestSession(requestSession) {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTags(tags) {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtras(extras) {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtra(key, extra) {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setFingerprint(fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setLevel(\n // eslint-disable-next-line deprecation/deprecation\n level,\n ) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTransactionName(name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setSpan(span) {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getSpan() {\n return this._span;\n }\n\n /**\n * @inheritDoc\n */\n getTransaction() {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n const span = this.getSpan();\n return span && span.transaction;\n }\n\n /**\n * @inheritDoc\n */\n setSession(session) {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getSession() {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n update(captureContext) {\n if (!captureContext) {\n return this;\n }\n\n if (typeof captureContext === 'function') {\n const updatedScope = (captureContext )(this);\n return updatedScope instanceof Scope ? updatedScope : this;\n }\n\n if (captureContext instanceof Scope) {\n this._tags = { ...this._tags, ...captureContext._tags };\n this._extra = { ...this._extra, ...captureContext._extra };\n this._contexts = { ...this._contexts, ...captureContext._contexts };\n if (captureContext._user && Object.keys(captureContext._user).length) {\n this._user = captureContext._user;\n }\n if (captureContext._level) {\n this._level = captureContext._level;\n }\n if (captureContext._fingerprint) {\n this._fingerprint = captureContext._fingerprint;\n }\n if (captureContext._requestSession) {\n this._requestSession = captureContext._requestSession;\n }\n if (captureContext._propagationContext) {\n this._propagationContext = captureContext._propagationContext;\n }\n } else if (isPlainObject(captureContext)) {\n // eslint-disable-next-line no-param-reassign\n captureContext = captureContext ;\n this._tags = { ...this._tags, ...captureContext.tags };\n this._extra = { ...this._extra, ...captureContext.extra };\n this._contexts = { ...this._contexts, ...captureContext.contexts };\n if (captureContext.user) {\n this._user = captureContext.user;\n }\n if (captureContext.level) {\n this._level = captureContext.level;\n }\n if (captureContext.fingerprint) {\n this._fingerprint = captureContext.fingerprint;\n }\n if (captureContext.requestSession) {\n this._requestSession = captureContext.requestSession;\n }\n if (captureContext.propagationContext) {\n this._propagationContext = captureContext.propagationContext;\n }\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n clear() {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n this._attachments = [];\n this._propagationContext = generatePropagationContext();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n this._breadcrumbs = [...this._breadcrumbs, mergedBreadcrumb].slice(-maxCrumbs);\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getLastBreadcrumb() {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n clearBreadcrumbs() {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addAttachment(attachment) {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getAttachments() {\n return this._attachments;\n }\n\n /**\n * @inheritDoc\n */\n clearAttachments() {\n this._attachments = [];\n return this;\n }\n\n /**\n * Applies data from the scope to the event and runs all event processors on it.\n *\n * @param event Event\n * @param hint Object containing additional information about the original exception, for use by the event processors.\n * @hidden\n */\n applyToEvent(event, hint = {}) {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = { ...this._contexts, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n const transaction = this._span.transaction;\n if (transaction) {\n event.sdkProcessingMetadata = {\n dynamicSamplingContext: transaction.getDynamicSamplingContext(),\n ...event.sdkProcessingMetadata,\n };\n const transactionName = transaction.name;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n }\n\n this._applyFingerprint(event);\n\n event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n ...this._sdkProcessingMetadata,\n propagationContext: this._propagationContext,\n };\n\n return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n setSDKProcessingMetadata(newData) {\n this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData };\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setPropagationContext(context) {\n this._propagationContext = context;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getPropagationContext() {\n return this._propagationContext;\n }\n\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n _notifyEventProcessors(\n processors,\n event,\n hint,\n index = 0,\n ) {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) ;\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n processor.id &&\n result === null &&\n logger.log(`Event processor \"${processor.id}\" dropped event`);\n\n if (isThenable(result)) {\n void result\n .then(final => this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void this._notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n }\n\n /**\n * This will be called on every set call.\n */\n _notifyScopeListeners() {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n _applyFingerprint(event) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint ? arrayify(event.fingerprint) : [];\n\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n }\n}\n\n/**\n * Returns the global event processors.\n */\nfunction getGlobalEventProcessors() {\n return getGlobalSingleton('globalEventProcessors', () => []);\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nfunction addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}\n\nfunction generatePropagationContext() {\n return {\n traceId: uuid4(),\n spanId: uuid4().substring(16),\n };\n}\n\nexport { Scope, addGlobalEventProcessor };\n//# sourceMappingURL=scope.js.map\n"],"sourceRoot":""}