{"version":3,"sources":["webpack:///./node_modules/@sentry/core/esm/basebackend.js","webpack:///./node_modules/@sentry/browser/esm/eventbuilder.js","webpack:///./node_modules/@sentry/browser/esm/tracekit.js","webpack:///./node_modules/@sentry/tracing/esm/errors.js","webpack:///./node_modules/@sentry/tracing/esm/idletransaction.js","webpack:///./node_modules/@sentry/utils/esm/polyfill.js","webpack:///./node_modules/@sentry/utils/esm/error.js","webpack:///./node_modules/@sentry/browser/esm/parsers.js","webpack:///./node_modules/@sentry/browser/esm/integrations/dedupe.js","webpack:///./node_modules/@sentry/types/esm/status.js","webpack:///./node_modules/@sentry/types/esm/session.js","webpack:///./node_modules/@sentry/browser/esm/integrations/linkederrors.js","webpack:///./node_modules/@sentry/utils/esm/promisebuffer.js","webpack:///./node_modules/@sentry/browser/esm/transports/base.js","webpack:///./node_modules/@sentry/tracing/esm/spanstatus.js","webpack:///./node_modules/@sentry/utils/esm/global.js","webpack:///./node_modules/@sentry/utils/esm/supports.js","webpack:///./node_modules/@sentry/types/esm/severity.js","webpack:///./node_modules/@sentry/browser/esm/transports/utils.js","webpack:///./node_modules/@sentry/utils/esm/async.js","webpack:///./node_modules/@sentry/core/esm/transports/noop.js","webpack:///./node_modules/@sentry/hub/esm/scope.js","webpack:///./node_modules/@sentry/utils/esm/browser.js","webpack:///./node_modules/@sentry/integrations/esm/dedupe.js","webpack:///./node_modules/@sentry/browser/esm/integrations/breadcrumbs.js","webpack:///./node_modules/@sentry/browser/esm/backend.js","webpack:///./node_modules/@sentry/browser/esm/client.js","webpack:///./node_modules/@sentry/tracing/esm/utils.js","webpack:///./node_modules/@sentry/utils/esm/time.js","webpack:///./node_modules/@sentry/react/esm/redux.js","webpack:///./node_modules/@sentry/utils/esm/memo.js","webpack:///./node_modules/@sentry/hub/esm/session.js","webpack:///./node_modules/@sentry/hub/esm/hub.js","webpack:///./node_modules/@sentry/browser/esm/integrations/useragent.js","webpack:///./node_modules/@sentry/utils/esm/syncpromise.js","webpack:///./node_modules/@sentry/react/esm/sdk.js","webpack:///./node_modules/@sentry/utils/esm/misc.js","webpack:///./node_modules/@sentry/tracing/esm/transaction.js","webpack:///./node_modules/@sentry/browser/esm/integrations/globalhandlers.js","webpack:///./node_modules/@sentry/core/esm/integration.js","webpack:///./node_modules/@sentry/core/esm/baseclient.js","webpack:///./node_modules/@sentry/tracing/esm/constants.js","webpack:///./node_modules/@sentry/utils/esm/logger.js","webpack:///./node_modules/@sentry/tracing/esm/hubextensions.js","webpack:///./node_modules/@sentry/browser/esm/transports/xhr.js","webpack:///./node_modules/@sentry/browser/esm/transports/fetch.js","webpack:///./node_modules/@sentry/types/esm/transport.js","webpack:///./node_modules/@sentry/core/esm/request.js","webpack:///./node_modules/@sentry/utils/esm/object.js","webpack:///./node_modules/@sentry/core/esm/integrations/functiontostring.js","webpack:///./node_modules/@sentry/core/esm/integrations/inboundfilters.js","webpack:///./node_modules/@sentry/core/esm/sdk.js","webpack:///./node_modules/@sentry/browser/esm/integrations/trycatch.js","webpack:///./node_modules/@sentry/browser/esm/sdk.js","webpack:///./node_modules/@sentry/tracing/esm/span.js","webpack:///./node_modules/@sentry/browser/esm/helpers.js","webpack:///./node_modules/@sentry/utils/esm/dsn.js","webpack:///./node_modules/@sentry/tracing/esm/integrations/node/express.js","webpack:///./node_modules/@sentry/tracing/esm/integrations/node/postgres.js","webpack:///./node_modules/@sentry/tracing/esm/integrations/node/mysql.js","webpack:///./node_modules/@sentry/tracing/esm/integrations/node/mongo.js","webpack:///./node_modules/@sentry/tracing/esm/browser/backgroundtab.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/bindReporter.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/initMetric.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/generateUniqueID.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/observe.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/onHidden.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/getVisibilityWatcher.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/getLCP.js","webpack:///./node_modules/@sentry/tracing/esm/browser/metrics.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/getCLS.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/getFID.js","webpack:///./node_modules/@sentry/tracing/esm/browser/request.js","webpack:///./node_modules/@sentry/tracing/esm/browser/router.js","webpack:///./node_modules/@sentry/tracing/esm/browser/browsertracing.js","webpack:///./node_modules/@sentry/tracing/esm/index.js","webpack:///./node_modules/@sentry/types/esm/transaction.js","webpack:///./node_modules/@sentry/react/esm/reactrouter.js","webpack:///./node_modules/@sentry/browser/esm/version.js","webpack:///./node_modules/@sentry/browser/esm/index.js","webpack:///./node_modules/@sentry/core/esm/api.js","webpack:///./node_modules/@sentry/minimal/esm/index.js","webpack:///./node_modules/@sentry/browser/esm/integrations/index.js","webpack:///./node_modules/@sentry/react/esm/constants.js","webpack:///./node_modules/@sentry/react/esm/profiler.js","webpack:///./node_modules/@sentry/react/esm/reactrouterv3.js","webpack:///./node_modules/@sentry/utils/esm/node.js","webpack:///./node_modules/@sentry/utils/esm/instrument.js","webpack:///./node_modules/@sentry/core/esm/version.js","webpack:///./node_modules/@sentry/utils/esm/stacktrace.js","webpack:///./node_modules/@sentry/utils/esm/string.js","webpack:///./node_modules/@sentry/browser/esm/transports/index.js","webpack:///./node_modules/@sentry/utils/esm/is.js","webpack:///./node_modules/@sentry/react/esm/errorboundary.js"],"names":["BaseBackend","options","this","_options","dsn","warn","_transport","_setupTransport","prototype","eventFromException","_exception","_hint","eventFromMessage","_message","_level","sendEvent","event","then","reason","error","sendSession","session","getTransport","exception","hint","eventFromUnknownInput","syntheticException","undefined","attachStacktrace","level","Error","event_id","resolve","message","Info","eventFromString","domException","name_1","name","tags","code","objectException","rejection","synthetic","input","stacktrace","frames_1","stack","frames","UNKNOWN_FUNCTION","chrome","gecko","winjs","geckoEval","chromeEval","reactMinifiedRegexp","computeStackTrace","ex","popSize","framesToPop","test","parts","opera10Regex","opera11Regex","lines","split","line","length","element","exec","url","func","args","column","push","extractMessage","computeStackTraceFromStacktraceProp","popFrames","e","_a","_b","submatch","i","isNative","indexOf","substr","extractSafariExtensionDetails","columnNumber","computeStackTraceFromStackProp","failed","isSafariExtension","isSafariWebExtension","slice","registerErrorInstrumentation","callback","errorCallback","type","activeTransaction","log","InternalError","setStatus","DEFAULT_IDLE_TIMEOUT","IdleTransactionSpanRecorder","_super","_pushActivity","_popActivity","transactionSpanId","maxlen","_this","call","add","span","spanId","finish","endTimestamp","IdleTransaction","transactionContext","_idleHub","_idleTimeout","_onScope","activities","_heartbeatCounter","_finished","_beforeFinishCallbacks","clearActiveTransaction","configureScope","scope","setSpan","_initTimeout","setTimeout","e_1","spanRecorder","Date","toISOString","op","_c","next","done","value","e_1_1","return","spans","filter","Cancelled","JSON","stringify","keepSpan","startTimestamp","registerBeforeFinishCallback","initSpanRecorder","id","_pingHeartbeat","clearTimeout","Object","keys","timeout","end_1","setTag","_beat","heartbeatString","join","_prevHeartbeatString","DeadlineExceeded","hub","getScope","getTransaction","setPrototypeOf","__proto__","Array","obj","proto","prop","hasOwnProperty","SentryError","_newTarget","constructor","exceptionFromStacktrace","prepareFramesForEvent","eventFromPlainObject","values","extra","__serialized__","eventFromStacktrace","localStack","firstFrameFunction","lastFrameFunction","map","frame","colno","filename","function","in_app","lineno","reverse","Dedupe","setupOnce","addGlobalEventProcessor","getCurrentHub","currentEvent","self","getIntegration","_shouldDropEvent","_previousEvent","_oO","previousEvent","_isSameMessageEvent","_isSameExceptionEvent","currentMessage","previousMessage","_isSameFingerprint","_isSameStacktrace","_getFramesFromEvent","currentFrames","previousFrames","frameA","frameB","_getExceptionFromEvent","previousException","currentException","currentFingerprint","fingerprint","previousFingerprint","Status","fromHttpCode","Success","RateLimit","Invalid","Failed","Unknown","SessionStatus","RequestSessionStatus","LinkedErrors","_key","key","_limit","limit","handler","_handler","bind","originalException","linkedErrors","_walkErrorTree","PromiseBuffer","_buffer","isReady","taskProducer","reject","task","remove","splice","drain","capturedSetTimeout","all","CATEGORY_MAPPING","transaction","attachment","BaseTransport","_rateLimits","_outcomes","_api","_metadata","tunnel","getStoreEndpointWithUrlEncodedAuth","sendClientReports","document","addEventListener","visibilityState","_flushOutcomes","_","close","recordLostEvent","category","logger","outcomes","getEnvelopeEndpointWithUrlEncodedAuth","envelope","getDsn","toString","timestamp","discarded_events","quantity","_handleResponse","requestType","response","headers","status","_handleRateLimit","_disabledUntil","_isRateLimited","now","e_2","rlHeader","raHeader","trim","_d","parameters","headerDelay","parseInt","delay","isNaN","_e","_f","e_2_1","SpanStatus","httpStatus","Ok","Unauthenticated","PermissionDenied","NotFound","AlreadyExists","FailedPrecondition","ResourceExhausted","InvalidArgument","Unimplemented","Unavailable","UnknownError","fallbackGlobalObject","getGlobalObject","global","window","supportsFetch","Headers","Request","Response","isNativeFetch","supportsNativeFetch","fetch","result","doc","createElement","sandbox","hidden","head","appendChild","contentWindow","removeChild","err","supportsReferrerPolicy","referrerPolicy","supportsHistory","isChromePackagedApp","app","runtime","hasHistoryApi","history","pushState","replaceState","Severity","fromString","Debug","Warning","Fatal","Critical","Log","cachedFetchImpl","getNativeFetchImplementation","fetchImpl","sendReport","body","navigator","sendBeacon","supports","fetch_1","method","credentials","keepalive","console","NoopTransport","Skipped","Scope","_notifyingListeners","_scopeListeners","_eventProcessors","_breadcrumbs","_user","_tags","_extra","_contexts","clone","newScope","_span","_session","_transactionName","_fingerprint","_requestSession","addScopeListener","addEventProcessor","setUser","user","update","_notifyScopeListeners","getUser","getRequestSession","setRequestSession","requestSession","setTags","setExtras","extras","setExtra","setFingerprint","setLevel","setTransactionName","setTransaction","setContext","context","getSpan","setSession","getSession","captureContext","updatedScope","contexts","clear","addBreadcrumb","breadcrumb","maxBreadcrumbs","maxCrumbs","Math","min","mergedBreadcrumb","clearBreadcrumbs","applyToEvent","trace","getTraceContext","transactionName","_applyFingerprint","breadcrumbs","_notifyEventProcessors","getGlobalEventProcessors","processors","index","processor","final","forEach","isArray","concat","__SENTRY__","globalEventProcessors","htmlTreeAsString","elem","keyAttrs","currentElem","out","height","len","sepLength","nextStr","_htmlElementAsString","parentNode","el","className","classes","attr","tagName","toLowerCase","keyAttrPairs","keyAttr","getAttribute","keyAttrPair","allowedAttrs","getLocationHref","location","href","oO","Breadcrumbs","dom","sentry","xhr","addSentryBreadcrumb","_i","arguments","_consoleBreadcrumb","apply","_domBreadcrumb","_xhrBreadcrumb","_fetchBreadcrumb","_historyBreadcrumb","handlerData","data","target","serializeAttribute","__sentry_own_request__","__sentry_xhr__","status_code","fetchData","match","from","to","parsedLoc","parsedFrom","parsedTo","path","protocol","host","relative","BrowserBackend","transportOptions","transport","BrowserClient","sdk","packages","version","showReportDialog","_isEnabled","_prepareEvent","platform","_sendEvent","integration","TRACEPARENT_REGEXP","RegExp","hasTracingEnabled","getClient","getOptions","extractTraceparentData","traceparent","matches","parentSampled","traceId","parentSpanId","getActiveTransaction","msToSec","time","secToMs","dateTimestampSource","nowSeconds","platformPerformance","module","performance","getNodePerformance","timeOrigin","getBrowserPerformance","timestampSource","dateTimestampInSeconds","timestampInSeconds","timestampWithMs","browserPerformanceTimeOrigin","threshold","performanceNow","dateNow","timeOriginDelta","abs","timeOriginIsReliable","navigationStart","timing","navigationStartDelta","STATE_CONTEXT_KEY","defaultOptions","actionTransformer","action","stateTransformer","state","createReduxEnhancer","enhancerOptions","reducer","initialState","newState","transformedAction","transformedState","configureScopeWithState","Memo","_hasWeakSet","WeakSet","_inner","memoize","has","unmemoize","delete","Session","errors","sid","duration","init","ignoreDuration","startingTime","started","ipAddress","ip_address","did","email","username","release","environment","userAgent","Exited","toJSON","attrs","user_agent","Hub","client","_version","_stack","getStackTop","bindClient","isOlderThan","setupIntegrations","pushScope","getStack","popScope","pop","withScope","captureException","eventId","_lastEventId","finalHint","_invokeClient","captureMessage","captureEvent","lastEventId","beforeBreadcrumb","finalBreadcrumb","run","oldHub","makeMain","startSpan","_callExtensionMethod","startTransaction","customSamplingContext","traceHeaders","captureSession","endSession","_sendSessionUpdate","startSession","currentSession","carrier","getMainCarrier","extensions","registry","getHubFromCarrier","setHubOnCarrier","hasHubOnCarrier","activeDomain","domain","active","registryHubTopStack","_Oo","getHubFromActiveDomain","UserAgent","request","referrer","Referer","SyncPromise","executor","_state","_handlers","_resolve","_setResult","_reject","_value","_executeHandlers","_attachHandler","cachedHandlers","onfulfilled","onrejected","collection","counter","resolvedCollection","item","TypeError","catch","val","finally","onfinally","isRejected","uuid4","crypto","msCrypto","getRandomValues","arr","Uint16Array","pad","num","v","replace","c","r","random","parseUrl","query","fragment","getEventDescription","addExceptionTypeValue","addExceptionMechanism","newMechanism","exceptionValue0","currentMechanism","mechanism","handled","mergedData","SEMVER_REGEXP","parseSemver","major","minor","patch","buildmetadata","prerelease","parseRetryAfterHeader","header","headerDate","parse","checkOrSetAlreadyCaught","__sentry_captured__","defineProperty","Transaction","_measurements","_hub","metadata","_trimEnd","trimEnd","setName","setMeasurements","measurements","setMetadata","newMetadata","sampled","SampleRate","finishedSpans","s","reduce","prev","current","start_timestamp","debug_meta","toContext","spanContext","updateWithContext","GlobalHandlers","_onErrorHandlerInstalled","_onUnhandledRejectionHandlerInstalled","onerror","onunhandledrejection","stackTraceLimit","_installGlobalOnErrorHandler","_installGlobalOnUnhandledRejectionHandler","currentHub","hasIntegration","isFailedOwnDelivery","msg","_eventFromIncompleteOnError","_enhanceEventWithInitialFrame","detail","_eventFromRejectionWithPrimitive","groups","String","installedIntegrations","filterDuplicates","integrations","acc","every","accIntegration","defaultIntegrations","userIntegrations","userIntegration","integrationsNames","alwaysLastToRun","getIntegrationsToSetup","setupIntegration","ALREADY_SEEN_ERROR","BaseClient","backendClass","_integrations","_numProcessing","_backend","_dsn","_process","_getBackend","_captureEvent","promisedEvent","is","_sendSession","flush","_isClientDoneProcessing","clientFinished","transportFlushed","enabled","initialized","_updateSessionFromEvent","crashed","errored","exceptions","exceptions_1","exceptions_1_1","sessionNonTerminal","Crashed","Number","ticked","interval","setInterval","clearInterval","normalizeDepth","prepared","_applyClientOptions","_applyIntegrationsMetadata","finalScope","evt","_normalizeEvent","depth","normalized","b","_experiments","ensureNoCircularStructures","dist","maxValueLength","integrationsArray","_processEvent","finalEvent","beforeSend","sampleRate","isTransaction","EventProcessor","__sentry__","beforeSendResult","_ensureBeforeSendRv","processedEvent","BeforeSend","promise","rv","nullErr","FINISH_REASON_TAG","IDLE_TRANSACTION_FINISH_REASONS","PREFIX","consoleSandbox","originalConsole","wrappedLevels","__sentry_original__","Logger","_enabled","disable","enable","toTraceparent","sample","samplingContext","transactionSampling","Explicit","tracesSampler","Sampler","rate","Inheritance","tracesSampleRate","Rate","isValidSampleRate","_startTransaction","maxSpans","startIdleTransaction","idleTimeout","onScope","addExtensionMethods","packageToIntegrationMapping","mongodb","Mongo","mongoose","mysql","Mysql","pg","Postgres","mappedPackages","moduleName","pkg","p","_autoloadDatabaseIntegrations","XHRTransport","_sendRequest","sentryRequest","originalPayload","RateLimitBackoff","Promise","XMLHttpRequest","onreadystatechange","readyState","getResponseHeader","open","setRequestHeader","send","QueueOverflow","NetworkError","FetchTransport","_fetch","fetchParameters","assign","get","Outcome","getSdkMetadataForEnvelopeHeader","api","enhanceEventWithSdkInfo","sdkInfo","sessionToSentryRequest","sent_at","forceEnvelope","eventToSentryRequest","eventType","useEnvelope","samplingMethod","req","sample_rates","fill","source","replacementFactory","original","wrapped","defineProperties","enumerable","urlEncode","object","encodeURIComponent","getWalkSource","event_1","currentTarget","CustomEvent","jsonSize","encodeURI","utf8Length","normalizeToSize","maxSize","serialized","normalize","normalizeValue","_events","walk","memo","Infinity","serializeValue","innerKey","extractExceptionKeysForMessage","maxLength","sort","includedKeys","dropUndefinedKeys","originalFunctionToString","FunctionToString","Function","DEFAULT_IGNORE_ERRORS","InboundFilters","clientOptions","_mergeOptions","_isSentryError","_isIgnoredError","_isDeniedUrl","_getEventFilterUrl","_isAllowedUrl","ignoreInternal","ignoreErrors","_getPossibleEventMessages","some","pattern","denyUrls","allowUrls","whitelistUrls","blacklistUrls","_getLastValidUrl","frames_2","initAndBind","clientClass","debug","initialScope","DEFAULT_EVENT_TARGET","TryCatch","eventTarget","requestAnimationFrame","_wrapTimeFunction","_wrapRAF","_wrapXHR","_wrapEventTarget","originalCallback","eventName","fn","handleEvent","originalRemoveEventListener","wrappedEventHandler","originalEventHandler","__sentry_wrapped__","originalSend","xmlHttpRequestProps","wrapOptions","window_1","SENTRY_RELEASE","autoSessionTracking","startSessionTracking","forceLoad","onLoad","wrap","SpanRecorder","_maxlen","Span","substring","description","child","startChild","childSpan","setData","setHttpStatus","spanStatus","isSuccess","sampledString","parent_span_id","span_id","trace_id","ignoreOnError","shouldIgnoreOnError","ignoreNextOnError","before","sentryWrapped","wrappedArguments","arg","property","getOwnPropertyDescriptor","configurable","injectReportDialog","script","async","src","getReportDialogEndpoint","onload","injectionPoint","DSN_REGEX","ERROR_MESSAGE","Dsn","_fromString","_fromComponents","_validate","withPassword","pass","port","projectId","publicKey","str","projectMatch","components","component","Express","_router","router","_methods","methods","wrapMiddlewareArgs","patchMiddleware","instrumentMiddlewares","arity","res","__sentry_transaction","span_1","once","a","_usePgNative","usePgNative","native","Client","orig","config","text","sql","fields","OPERATIONS","OPERATION_SIGNATURES","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","dropIndex","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexExists","insertMany","insertOne","mapReduce","rename","replaceOne","updateMany","updateOne","_operations","operations","_describeOperations","describeOperations","_useMongoose","useMongoose","_instrumentOperations","Collection","operation","_patchOperation","getSpanContext","_getSpanContextFromOperationArguments","lastArg","parentSpan","maybePromise","collectionName","dbName","namespace","signature","shouldDescribe","includes","bindReporter","metric","reportAllChanges","prevValue","forceReport","delta","initMetric","entries","floor","observe","PerformanceObserver","supportedEntryTypes","po","l","getEntries","buffered","onHidden","cb","onHiddenOrPageHide","removeEventListener","firstHiddenTime","getVisibilityWatcher","timeStamp","reportedMetricIDs","MetricsInstrumentation","_reportAllChanges","_performanceCursor","mark","_trackCLS","_trackLCP","_trackFID","addPerformanceEntries","entryScriptSrc","entryScriptStartTimestamp","tracingInitMarkStartTime","responseStartTimestamp","requestStartTimestamp","scripts","dataset","entry","startTime","entryType","addPerformanceNavigationTiming","eventEnd","_startChild","requestStart","responseEnd","responseStart","addRequest","addNavigationSpans","measureStartTimestamp","measureEndTimestamp","addMeasureSpans","firstHidden","shouldRecord","resourceName","origin","initiatorType","transferSize","encodedBodySize","decodedBodySize","addResourceSpans","max","_trackNavigator","timeOrigin_1","oldValue","measurementTimestamp","normalizedValue","cls","_tagMetricInfo","_lcpEntry","size","_clsEntry","sources","node","onReport","report","sessionValue","sessionEntries","entryHandler","hadRecentInput","firstSessionEntry","lastSessionEntry","takeRecords","connection","effectiveType","isMeasurementValue","rtt","downlink","deviceMemory","hardwareConcurrency","visibilityWatcher","stopListening_1","disconnect","capture","getLCP","processingStart","props","end","start","ctx","isFinite","defaultRequestInstrumentationOptions","traceFetch","traceXHR","tracingOrigins","instrumentOutgoingRequests","shouldCreateSpanForRequest","urlMap","defaultShouldCreateSpan","origins","shouldCreateSpan","__span","append","fetchCallback","__sentry_xhr_span_id__","xhrCallback","DEFAULT_BROWSER_TRACING_OPTIONS","markBackgroundTransactions","maxTransactionDuration","routingInstrumentation","customStartTransaction","startTransactionOnPageLoad","startTransactionOnLocationChange","startingUrl","pathname","BrowserTracing","_emitOptionsWarning","_configuredIdleTimeout","_metricOptions","_metrics","_getCurrentHub","instrumentRouting","_createRouteTransaction","beforeNavigate","parentContextFromHeader","metaName","querySelector","getHeaderContext","expandedContext","modifiedContext","finalContext","idleTransaction","maxDuration","diff","adjustTransactionDuration","TransactionSamplingMethod","reactRouterV4Instrumentation","routes","matchPath","createReactRouterInstrumentation","reactRouterV5Instrumentation","allRoutes","getTransactionName","branches","matchRoutes","x","isExact","initPathName","listen","branch","route","params","computeRootMatch","withSentryRouting","Route","componentDisplayName","displayName","WrappedRoute","computedMatch","SDK_NAME","windowIntegrations","_window","Sentry","Integrations","INTEGRATIONS","API","_dsnObject","_tunnel","getBaseApiEndpoint","getStoreEndpoint","_getIngestEndpoint","_encodedAuth","_getEnvelopeEndpoint","getStoreEndpointPath","getRequestHeaders","clientName","clientVersion","dialogOptions","endpoint","encodedOptions","auth","sentry_key","sentry_version","callOnHub","REACT_RENDER_OP","REACT_MOUNT_OP","TRACING_GETTER","globalTracingIntegration","Profiler","_mountSpan","_mountActivity","disabled","pushActivity","componentDidMount","activity","getActivitySpan","popActivity","componentDidUpdate","updateProps","includeUpdates","changedProps","k","componentWillUnmount","includeRender","render","children","defaultProps","withProfiler","WrappedComponent","Wrapped","useProfiler","hasRenderSpan","mountSpan","reactRouterV3Instrumentation","prevName","normalizeTransactionName","localName","tags_1","appRoutes","_redirectLocation","renderProps","routePath","routesWithPaths","startsWith","getRouteStringFromRoutes","isNodeEnv","process","dynamicRequire","mod","require","loadModule","cwd","lastHref","handlers","instrumented","instrument","originalConsoleLevel","triggerHandlers","instrumentConsole","triggerDOMHandler","globalDOMEventHandler","makeDOMEventHandler","originalAddEventListener","listener","handlers_1","__sentry_instrumentation_handlers__","handlerForType","refCount","handlers_2","instrumentDOM","requestKeys","requestValues","xhrproto","originalOpen","toUpperCase","onreadystatechangeHandler","requestPos","args_1","readyStateArgs","instrumentXHR","originalFetch","getFetchMethod","getFetchUrl","instrumentFetch","oldOnPopState","onpopstate","historyReplacementFunction","originalHistoryFunction","instrumentHistory","_oldOnErrorHandler","_oldOnUnhandledRejectionHandler","addInstrumentationHandler","fetchArgs","debounceTimerID","lastCapturedEvent","globalListener","isContentEditable","shouldSkipDOMEvent","previous","shouldShortcircuitPreviousDebounce","SDK_VERSION","defaultFunctionName","getFunctionName","truncate","snipLine","newLine","ll","safeJoin","delimiter","output","isMatchingPattern","isError","wat","isInstanceOf","isErrorEvent","isDOMError","isDOMException","isString","isPrimitive","isPlainObject","isEvent","Event","isElement","Element","isRegExp","isThenable","Boolean","isSyntheticEvent","base","reactVersion","INITIAL_STATE","componentStack","ErrorBoundary","resetErrorBoundary","onReset","setState","componentDidCatch","beforeCapture","onError","showDialog","errorBoundaryError","cause","react","onMount","onUnmount","fallback","resetError","withErrorBoundary","errorBoundaryOptions"],"mappings":"iGAAA,sFAMIA,EAA6B,WAE7B,SAASA,EAAYC,GACjBC,KAAKC,SAAWF,EACXC,KAAKC,SAASC,KACf,IAAOC,KAAK,kDAEhBH,KAAKI,WAAaJ,KAAKK,kBA+C3B,OAzCAP,EAAYQ,UAAUC,mBAAqB,SAAUC,EAAYC,GAC7D,MAAM,IAAI,IAAY,yDAK1BX,EAAYQ,UAAUI,iBAAmB,SAAUC,EAAUC,EAAQH,GACjE,MAAM,IAAI,IAAY,uDAK1BX,EAAYQ,UAAUO,UAAY,SAAUC,GACnCd,KAAKI,WAAWS,UAAUC,GAAOC,KAAK,MAAM,SAAUC,GACvD,IAAOC,MAAM,8BAAgCD,OAMrDlB,EAAYQ,UAAUY,YAAc,SAAUC,GACrCnB,KAAKI,WAAWc,YAIhBlB,KAAKI,WAAWc,YAAYC,GAASJ,KAAK,MAAM,SAAUC,GAC3D,IAAOC,MAAM,gCAAkCD,MAJ/C,IAAOb,KAAK,4EAUpBL,EAAYQ,UAAUc,aAAe,WACjC,OAAOpB,KAAKI,YAKhBN,EAAYQ,UAAUD,gBAAkB,WACpC,OAAO,IAAI,KAERP,EAtDqB,I,wCCNhC,0NASO,SAASS,EAAmBR,EAASsB,EAAWC,GACnD,IACIR,EAAQS,EAAsBF,EADRC,GAAQA,EAAKE,yBAAuBC,EACG,CAC7DC,iBAAkB3B,EAAQ2B,mBAO9B,OALA,YAAsBZ,GACtBA,EAAMa,MAAQ,IAASC,MACnBN,GAAQA,EAAKO,WACbf,EAAMe,SAAWP,EAAKO,UAEnB,IAAYC,QAAQhB,GAMxB,SAASJ,EAAiBX,EAASgC,EA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,EAAG8sC,SACvD7sC,EAAK9E,KAAKmiB,MAAOlhB,EAAQ6D,EAAG7D,MAAOo3C,EAAiBvzC,EAAGuzC,eAAgB/yB,EAAUxgB,EAAGwgB,QACxF,GAAIrkB,EAAO,CACP,IAAIiD,OAAUzC,EAOd,OALIyC,EADoB,mBAAbi1C,EACGA,EAAS,CAAEl4C,MAAOA,EAAOo3C,eAAgBA,EAAgBe,WAAYp5C,KAAKu4C,mBAAoBjzB,QAASA,IAGvG6zB,EAEV,iBAAqBj1C,GACdA,GAEPi1C,GACA,IAAOh5C,KAAK,iDAGT,MAEX,MAAwB,mBAAbwxC,EACAA,IAEJA,GAEJ2G,EAnFuB,CAoFhC,aAEF,SAASe,EAAkBvH,EAAkBwH,GAEzC,IAAI7K,EAAuBqD,EAAiBpD,aAAeoD,EAAiB1vC,MApGjD,UAqGvB2vC,EAAU,SAAU3H,GAAS,OAAQ,gBAAoBkO,EAAe,YAAS,GAAIgB,GACrF,gBAAoBxH,EAAkB,YAAS,GAAI1H,MAMvD,OAJA2H,EAAQrD,YAAc,iBAAmBD,EAAuB,IAGhE,IAAqBsD,EAASD,GACvBC","file":"script/chunks/chunk.vendor-sentry.e7bdfbc002.js","sourcesContent":["import { logger, SentryError } from '@sentry/utils';\nimport { NoopTransport } from './transports/noop';\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nvar BaseBackend = /** @class */ (function () {\n /** Creates a new backend instance. */\n function BaseBackend(options) {\n this._options = options;\n if (!this._options.dsn) {\n logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n BaseBackend.prototype.eventFromException = function (_exception, _hint) {\n throw new SentryError('Backend has to implement `eventFromException` method');\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.eventFromMessage = function (_message, _level, _hint) {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.sendEvent = function (event) {\n void this._transport.sendEvent(event).then(null, function (reason) {\n logger.error(\"Error while sending event: \" + reason);\n });\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.sendSession = function (session) {\n if (!this._transport.sendSession) {\n logger.warn(\"Dropping session because custom transport doesn't implement sendSession\");\n return;\n }\n void this._transport.sendSession(session).then(null, function (reason) {\n logger.error(\"Error while sending session: \" + reason);\n });\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.getTransport = function () {\n return this._transport;\n };\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n BaseBackend.prototype._setupTransport = function () {\n return new NoopTransport();\n };\n return BaseBackend;\n}());\nexport { BaseBackend };\n//# sourceMappingURL=basebackend.js.map","import { __assign } from \"tslib\";\nimport { Severity } from '@sentry/types';\nimport { addExceptionMechanism, addExceptionTypeValue, isDOMError, isDOMException, isError, isErrorEvent, isEvent, isPlainObject, SyncPromise, } from '@sentry/utils';\nimport { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers';\nimport { computeStackTrace } from './tracekit';\n/**\n * Builds and Event from a Exception\n * @hidden\n */\nexport function eventFromException(options, exception, hint) {\n var syntheticException = (hint && hint.syntheticException) || undefined;\n var event = eventFromUnknownInput(exception, syntheticException, {\n attachStacktrace: options.attachStacktrace,\n });\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n}\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(options, message, level, hint) {\n if (level === void 0) { level = Severity.Info; }\n var syntheticException = (hint && hint.syntheticException) || undefined;\n var event = eventFromString(message, syntheticException, {\n attachStacktrace: options.attachStacktrace,\n });\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n}\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(exception, syntheticException, options) {\n if (options === void 0) { options = {}; }\n var event;\n if (isErrorEvent(exception) && exception.error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n var errorEvent = exception;\n // eslint-disable-next-line no-param-reassign\n exception = errorEvent.error;\n event = eventFromStacktrace(computeStackTrace(exception));\n return event;\n }\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception) || isDOMException(exception)) {\n var domException = exception;\n if ('stack' in exception) {\n event = eventFromStacktrace(computeStackTrace(exception));\n }\n else {\n var name_1 = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n var message = domException.message ? name_1 + \": \" + domException.message : name_1;\n event = eventFromString(message, syntheticException, options);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n event.tags = __assign(__assign({}, event.tags), { 'DOMException.code': \"\" + domException.code });\n }\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n event = eventFromStacktrace(computeStackTrace(exception));\n return event;\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it is plain Object or Event, serialize it manually and extract options\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n var objectException = exception;\n event = eventFromPlainObject(objectException, syntheticException, options.rejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(exception, syntheticException, options);\n addExceptionTypeValue(event, \"\" + exception, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n}\n/**\n * @hidden\n */\nexport function eventFromString(input, syntheticException, options) {\n if (options === void 0) { options = {}; }\n var event = {\n message: input,\n };\n if (options.attachStacktrace && syntheticException) {\n var stacktrace = computeStackTrace(syntheticException);\n var frames_1 = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames: frames_1,\n };\n }\n return event;\n}\n//# sourceMappingURL=eventbuilder.js.map","/**\n * This was originally forked from https://github.com/occ/TraceKit, but has since been\n * largely modified and is now maintained as part of Sentry JS SDK.\n */\nimport { __assign, __read } from \"tslib\";\n// global reference to slice\nvar UNKNOWN_FUNCTION = '?';\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nvar chrome = /^\\s*at (?:(.*?) ?\\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nvar gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nvar geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nvar chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nvar reactMinifiedRegexp = /Minified React error #\\d+;/i;\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function computeStackTrace(ex) {\n var stack = null;\n var popSize = 0;\n if (ex) {\n if (typeof ex.framesToPop === 'number') {\n popSize = ex.framesToPop;\n }\n else if (reactMinifiedRegexp.test(ex.message)) {\n popSize = 1;\n }\n }\n try {\n // This must be tried first because Opera 10 *destroys*\n // its stacktrace property if you try to access the stack\n // property first!!\n stack = computeStackTraceFromStacktraceProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n }\n catch (e) {\n // no-empty\n }\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n }\n catch (e) {\n // no-empty\n }\n return {\n message: extractMessage(ex),\n name: ex && ex.name,\n stack: [],\n failed: true,\n };\n}\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, complexity\nfunction computeStackTraceFromStackProp(ex) {\n var _a, _b;\n if (!ex || !ex.stack) {\n return null;\n }\n var stack = [];\n var lines = ex.stack.split('\\n');\n var isEval;\n var submatch;\n var parts;\n var element;\n for (var i = 0; i < lines.length; ++i) {\n if ((parts = chrome.exec(lines[i]))) {\n var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n // Arpad: Working with the regexp above is super painful. it is quite a hack, but just stripping the `address at `\n // prefix here seems like the quickest solution for now.\n var url = parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2];\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n var func = parts[1] || UNKNOWN_FUNCTION;\n _a = __read(extractSafariExtensionDetails(func, url), 2), func = _a[0], url = _a[1];\n element = {\n url: url,\n func: func,\n args: isNative ? [parts[2]] : [],\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null,\n };\n }\n else if ((parts = winjs.exec(lines[i]))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: [],\n line: +parts[3],\n column: parts[4] ? +parts[4] : null,\n };\n }\n else if ((parts = gecko.exec(lines[i]))) {\n isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || \"eval\";\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = ''; // no column when eval\n }\n else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) {\n // FireFox uses this awesome columnNumber property for its top frame\n // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n // so adding 1\n // NOTE: this hack doesn't work if top-most frame is eval\n stack[0].column = ex.columnNumber + 1;\n }\n var url = parts[3];\n var func = parts[1] || UNKNOWN_FUNCTION;\n _b = __read(extractSafariExtensionDetails(func, url), 2), func = _b[0], url = _b[1];\n element = {\n url: url,\n func: func,\n args: parts[2] ? parts[2].split(',') : [],\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null,\n };\n }\n else {\n continue;\n }\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n stack.push(element);\n }\n if (!stack.length) {\n return null;\n }\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack: stack,\n };\n}\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction computeStackTraceFromStacktraceProp(ex) {\n if (!ex || !ex.stacktrace) {\n return null;\n }\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n var stacktrace = ex.stacktrace;\n var opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n var opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\((.*)\\))? in (.*):\\s*$/i;\n var lines = stacktrace.split('\\n');\n var stack = [];\n var parts;\n for (var line = 0; line < lines.length; line += 2) {\n var element = null;\n if ((parts = opera10Regex.exec(lines[line]))) {\n element = {\n url: parts[2],\n func: parts[3],\n args: [],\n line: +parts[1],\n column: null,\n };\n }\n else if ((parts = opera11Regex.exec(lines[line]))) {\n element = {\n url: parts[6],\n func: parts[3] || parts[4],\n args: parts[5] ? parts[5].split(',') : [],\n line: +parts[1],\n column: +parts[2],\n };\n }\n if (element) {\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n stack.push(element);\n }\n }\n if (!stack.length) {\n return null;\n }\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack: stack,\n };\n}\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunatelly \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nvar extractSafariExtensionDetails = function (func, url) {\n var isSafariExtension = func.indexOf('safari-extension') !== -1;\n var isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? \"safari-extension:\" + url : \"safari-web-extension:\" + url,\n ]\n : [func, url];\n};\n/** Remove N number of frames from the stack */\nfunction popFrames(stacktrace, popSize) {\n try {\n return __assign(__assign({}, stacktrace), { stack: stacktrace.stack.slice(popSize) });\n }\n catch (e) {\n return stacktrace;\n }\n}\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction extractMessage(ex) {\n var message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n//# sourceMappingURL=tracekit.js.map","import { addInstrumentationHandler, logger } from '@sentry/utils';\nimport { SpanStatus } from './spanstatus';\nimport { getActiveTransaction } from './utils';\n/**\n * Configures global error listeners\n */\nexport function registerErrorInstrumentation() {\n addInstrumentationHandler({\n callback: errorCallback,\n type: 'error',\n });\n addInstrumentationHandler({\n callback: errorCallback,\n type: 'unhandledrejection',\n });\n}\n/**\n * If an error or unhandled promise occurs, we mark the active transaction as failed\n */\nfunction errorCallback() {\n var activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n logger.log(\"[Tracing] Transaction: \" + SpanStatus.InternalError + \" -> Global error occured\");\n activeTransaction.setStatus(SpanStatus.InternalError);\n }\n}\n//# sourceMappingURL=errors.js.map","import { __extends, __values } from \"tslib\";\nimport { logger, timestampWithMs } from '@sentry/utils';\nimport { FINISH_REASON_TAG, IDLE_TRANSACTION_FINISH_REASONS } from './constants';\nimport { SpanRecorder } from './span';\nimport { SpanStatus } from './spanstatus';\nimport { Transaction } from './transaction';\nexport var DEFAULT_IDLE_TIMEOUT = 1000;\nexport var HEARTBEAT_INTERVAL = 5000;\n/**\n * @inheritDoc\n */\nvar IdleTransactionSpanRecorder = /** @class */ (function (_super) {\n __extends(IdleTransactionSpanRecorder, _super);\n function IdleTransactionSpanRecorder(_pushActivity, _popActivity, transactionSpanId, maxlen) {\n if (transactionSpanId === void 0) { transactionSpanId = ''; }\n var _this = _super.call(this, maxlen) || this;\n _this._pushActivity = _pushActivity;\n _this._popActivity = _popActivity;\n _this.transactionSpanId = transactionSpanId;\n return _this;\n }\n /**\n * @inheritDoc\n */\n IdleTransactionSpanRecorder.prototype.add = function (span) {\n var _this = this;\n // We should make sure we do not push and pop activities for\n // the transaction that this span recorder belongs to.\n if (span.spanId !== this.transactionSpanId) {\n // We patch span.finish() to pop an activity after setting an endTimestamp.\n span.finish = function (endTimestamp) {\n span.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampWithMs();\n _this._popActivity(span.spanId);\n };\n // We should only push new activities if the span does not have an end timestamp.\n if (span.endTimestamp === undefined) {\n this._pushActivity(span.spanId);\n }\n }\n _super.prototype.add.call(this, span);\n };\n return IdleTransactionSpanRecorder;\n}(SpanRecorder));\nexport { IdleTransactionSpanRecorder };\n/**\n * An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities.\n * You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will\n * put itself on the scope on creation.\n */\nvar IdleTransaction = /** @class */ (function (_super) {\n __extends(IdleTransaction, _super);\n function IdleTransaction(transactionContext, _idleHub, \n /**\n * The time to wait in ms until the idle transaction will be finished.\n * @default 1000\n */\n _idleTimeout, \n // If an idle transaction should be put itself on and off the scope automatically.\n _onScope) {\n if (_idleTimeout === void 0) { _idleTimeout = DEFAULT_IDLE_TIMEOUT; }\n if (_onScope === void 0) { _onScope = false; }\n var _this = _super.call(this, transactionContext, _idleHub) || this;\n _this._idleHub = _idleHub;\n _this._idleTimeout = _idleTimeout;\n _this._onScope = _onScope;\n // Activities store a list of active spans\n _this.activities = {};\n // Amount of times heartbeat has counted. Will cause transaction to finish after 3 beats.\n _this._heartbeatCounter = 0;\n // We should not use heartbeat if we finished a transaction\n _this._finished = false;\n _this._beforeFinishCallbacks = [];\n if (_idleHub && _onScope) {\n // There should only be one active transaction on the scope\n clearActiveTransaction(_idleHub);\n // We set the transaction here on the scope so error events pick up the trace\n // context and attach it to the error.\n logger.log(\"Setting idle transaction on scope. Span ID: \" + _this.spanId);\n _idleHub.configureScope(function (scope) { return scope.setSpan(_this); });\n }\n _this._initTimeout = setTimeout(function () {\n if (!_this._finished) {\n _this.finish();\n }\n }, _this._idleTimeout);\n return _this;\n }\n /** {@inheritDoc} */\n IdleTransaction.prototype.finish = function (endTimestamp) {\n var e_1, _a;\n var _this = this;\n if (endTimestamp === void 0) { endTimestamp = timestampWithMs(); }\n this._finished = true;\n this.activities = {};\n if (this.spanRecorder) {\n logger.log('[Tracing] finishing IdleTransaction', new Date(endTimestamp * 1000).toISOString(), this.op);\n try {\n for (var _b = __values(this._beforeFinishCallbacks), _c = _b.next(); !_c.done; _c = _b.next()) {\n var callback = _c.value;\n callback(this, endTimestamp);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n this.spanRecorder.spans = this.spanRecorder.spans.filter(function (span) {\n // If we are dealing with the transaction itself, we just return it\n if (span.spanId === _this.spanId) {\n return true;\n }\n // We cancel all pending spans with status \"cancelled\" to indicate the idle transaction was finished early\n if (!span.endTimestamp) {\n span.endTimestamp = endTimestamp;\n span.setStatus(SpanStatus.Cancelled);\n logger.log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2));\n }\n var keepSpan = span.startTimestamp < endTimestamp;\n if (!keepSpan) {\n logger.log('[Tracing] discarding Span since it happened after Transaction was finished', JSON.stringify(span, undefined, 2));\n }\n return keepSpan;\n });\n logger.log('[Tracing] flushing IdleTransaction');\n }\n else {\n logger.log('[Tracing] No active IdleTransaction');\n }\n // this._onScope is true if the transaction was previously on the scope.\n if (this._onScope) {\n clearActiveTransaction(this._idleHub);\n }\n return _super.prototype.finish.call(this, endTimestamp);\n };\n /**\n * Register a callback function that gets excecuted before the transaction finishes.\n * Useful for cleanup or if you want to add any additional spans based on current context.\n *\n * This is exposed because users have no other way of running something before an idle transaction\n * finishes.\n */\n IdleTransaction.prototype.registerBeforeFinishCallback = function (callback) {\n this._beforeFinishCallbacks.push(callback);\n };\n /**\n * @inheritDoc\n */\n IdleTransaction.prototype.initSpanRecorder = function (maxlen) {\n var _this = this;\n if (!this.spanRecorder) {\n var pushActivity = function (id) {\n if (_this._finished) {\n return;\n }\n _this._pushActivity(id);\n };\n var popActivity = function (id) {\n if (_this._finished) {\n return;\n }\n _this._popActivity(id);\n };\n this.spanRecorder = new IdleTransactionSpanRecorder(pushActivity, popActivity, this.spanId, maxlen);\n // Start heartbeat so that transactions do not run forever.\n logger.log('Starting heartbeat');\n this._pingHeartbeat();\n }\n this.spanRecorder.add(this);\n };\n /**\n * Start tracking a specific activity.\n * @param spanId The span id that represents the activity\n */\n IdleTransaction.prototype._pushActivity = function (spanId) {\n if (this._initTimeout) {\n clearTimeout(this._initTimeout);\n this._initTimeout = undefined;\n }\n logger.log(\"[Tracing] pushActivity: \" + spanId);\n this.activities[spanId] = true;\n logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n };\n /**\n * Remove an activity from usage\n * @param spanId The span id that represents the activity\n */\n IdleTransaction.prototype._popActivity = function (spanId) {\n var _this = this;\n if (this.activities[spanId]) {\n logger.log(\"[Tracing] popActivity \" + spanId);\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this.activities[spanId];\n logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n if (Object.keys(this.activities).length === 0) {\n var timeout = this._idleTimeout;\n // We need to add the timeout here to have the real endtimestamp of the transaction\n // Remember timestampWithMs is in seconds, timeout is in ms\n var end_1 = timestampWithMs() + timeout / 1000;\n setTimeout(function () {\n if (!_this._finished) {\n _this.setTag(FINISH_REASON_TAG, IDLE_TRANSACTION_FINISH_REASONS[1]);\n _this.finish(end_1);\n }\n }, timeout);\n }\n };\n /**\n * Checks when entries of this.activities are not changing for 3 beats.\n * If this occurs we finish the transaction.\n */\n IdleTransaction.prototype._beat = function () {\n // We should not be running heartbeat if the idle transaction is finished.\n if (this._finished) {\n return;\n }\n var heartbeatString = Object.keys(this.activities).join('');\n if (heartbeatString === this._prevHeartbeatString) {\n this._heartbeatCounter += 1;\n }\n else {\n this._heartbeatCounter = 1;\n }\n this._prevHeartbeatString = heartbeatString;\n if (this._heartbeatCounter >= 3) {\n logger.log(\"[Tracing] Transaction finished because of no change for 3 heart beats\");\n this.setStatus(SpanStatus.DeadlineExceeded);\n this.setTag(FINISH_REASON_TAG, IDLE_TRANSACTION_FINISH_REASONS[0]);\n this.finish();\n }\n else {\n this._pingHeartbeat();\n }\n };\n /**\n * Pings the heartbeat\n */\n IdleTransaction.prototype._pingHeartbeat = function () {\n var _this = this;\n logger.log(\"pinging Heartbeat -> current counter: \" + this._heartbeatCounter);\n setTimeout(function () {\n _this._beat();\n }, HEARTBEAT_INTERVAL);\n };\n return IdleTransaction;\n}(Transaction));\nexport { IdleTransaction };\n/**\n * Reset active transaction on scope\n */\nfunction clearActiveTransaction(hub) {\n if (hub) {\n var scope = hub.getScope();\n if (scope) {\n var transaction = scope.getTransaction();\n if (transaction) {\n scope.setSpan(undefined);\n }\n }\n }\n}\n//# sourceMappingURL=idletransaction.js.map","export var setPrototypeOf = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties);\n/**\n * setPrototypeOf polyfill using __proto__\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction setProtoOf(obj, proto) {\n // @ts-ignore __proto__ does not exist on obj\n obj.__proto__ = proto;\n return obj;\n}\n/**\n * setPrototypeOf polyfill using mixin\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction mixinProperties(obj, proto) {\n for (var prop in proto) {\n if (!Object.prototype.hasOwnProperty.call(obj, prop)) {\n // @ts-ignore typescript complains about indexing so we remove\n obj[prop] = proto[prop];\n }\n }\n return obj;\n}\n//# sourceMappingURL=polyfill.js.map","import { __extends } from \"tslib\";\nimport { setPrototypeOf } from './polyfill';\n/** An error emitted by Sentry SDKs and related utilities. */\nvar SentryError = /** @class */ (function (_super) {\n __extends(SentryError, _super);\n function SentryError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.message = message;\n _this.name = _newTarget.prototype.constructor.name;\n setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return SentryError;\n}(Error));\nexport { SentryError };\n//# sourceMappingURL=error.js.map","import { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils';\nimport { computeStackTrace } from './tracekit';\nvar STACKTRACE_LIMIT = 50;\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromStacktrace(stacktrace) {\n var frames = prepareFramesForEvent(stacktrace.stack);\n var exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n if (frames && frames.length) {\n exception.stacktrace = { frames: frames };\n }\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n return exception;\n}\n/**\n * @hidden\n */\nexport function eventFromPlainObject(exception, syntheticException, rejection) {\n var event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error',\n value: \"Non-Error \" + (rejection ? 'promise rejection' : 'exception') + \" captured with keys: \" + extractExceptionKeysForMessage(exception),\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n if (syntheticException) {\n var stacktrace = computeStackTrace(syntheticException);\n var frames_1 = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames: frames_1,\n };\n }\n return event;\n}\n/**\n * @hidden\n */\nexport function eventFromStacktrace(stacktrace) {\n var exception = exceptionFromStacktrace(stacktrace);\n return {\n exception: {\n values: [exception],\n },\n };\n}\n/**\n * @hidden\n */\nexport function prepareFramesForEvent(stack) {\n if (!stack || !stack.length) {\n return [];\n }\n var localStack = stack;\n var firstFrameFunction = localStack[0].func || '';\n var lastFrameFunction = localStack[localStack.length - 1].func || '';\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n }\n // The frame where the crash happened, should be the last entry in the array\n return localStack\n .slice(0, STACKTRACE_LIMIT)\n .map(function (frame) { return ({\n colno: frame.column === null ? undefined : frame.column,\n filename: frame.url || localStack[0].url,\n function: frame.func || '?',\n in_app: true,\n lineno: frame.line === null ? undefined : frame.line,\n }); })\n .reverse();\n}\n//# sourceMappingURL=parsers.js.map","import { logger } from '@sentry/utils';\n/** Deduplication filter */\nvar Dedupe = /** @class */ (function () {\n function Dedupe() {\n /**\n * @inheritDoc\n */\n this.name = Dedupe.id;\n }\n /**\n * @inheritDoc\n */\n Dedupe.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) {\n addGlobalEventProcessor(function (currentEvent) {\n var self = getCurrentHub().getIntegration(Dedupe);\n if (self) {\n // Juuust in case something goes wrong\n try {\n if (self._shouldDropEvent(currentEvent, self._previousEvent)) {\n logger.warn(\"Event dropped due to being a duplicate of previously captured event.\");\n return null;\n }\n }\n catch (_oO) {\n return (self._previousEvent = currentEvent);\n }\n return (self._previousEvent = currentEvent);\n }\n return currentEvent;\n });\n };\n /** JSDoc */\n Dedupe.prototype._shouldDropEvent = function (currentEvent, previousEvent) {\n if (!previousEvent) {\n return false;\n }\n if (this._isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n if (this._isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n return false;\n };\n /** JSDoc */\n Dedupe.prototype._isSameMessageEvent = function (currentEvent, previousEvent) {\n var currentMessage = currentEvent.message;\n var previousMessage = previousEvent.message;\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n if (currentMessage !== previousMessage) {\n return false;\n }\n if (!this._isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n if (!this._isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n return true;\n };\n /** JSDoc */\n Dedupe.prototype._getFramesFromEvent = function (event) {\n var exception = event.exception;\n if (exception) {\n try {\n // @ts-ignore Object could be undefined\n return exception.values[0].stacktrace.frames;\n }\n catch (_oO) {\n return undefined;\n }\n }\n else if (event.stacktrace) {\n return event.stacktrace.frames;\n }\n return undefined;\n };\n /** JSDoc */\n Dedupe.prototype._isSameStacktrace = function (currentEvent, previousEvent) {\n var currentFrames = this._getFramesFromEvent(currentEvent);\n var previousFrames = this._getFramesFromEvent(previousEvent);\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n currentFrames = currentFrames;\n previousFrames = previousFrames;\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n // Otherwise, compare the two\n for (var i = 0; i < previousFrames.length; i++) {\n var frameA = previousFrames[i];\n var frameB = currentFrames[i];\n if (frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function) {\n return false;\n }\n }\n return true;\n };\n /** JSDoc */\n Dedupe.prototype._getExceptionFromEvent = function (event) {\n return event.exception && event.exception.values && event.exception.values[0];\n };\n /** JSDoc */\n Dedupe.prototype._isSameExceptionEvent = function (currentEvent, previousEvent) {\n var previousException = this._getExceptionFromEvent(previousEvent);\n var currentException = this._getExceptionFromEvent(currentEvent);\n if (!previousException || !currentException) {\n return false;\n }\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n if (!this._isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n if (!this._isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n return true;\n };\n /** JSDoc */\n Dedupe.prototype._isSameFingerprint = function (currentEvent, previousEvent) {\n var currentFingerprint = currentEvent.fingerprint;\n var previousFingerprint = previousEvent.fingerprint;\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n currentFingerprint = currentFingerprint;\n previousFingerprint = previousFingerprint;\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n }\n catch (_oO) {\n return false;\n }\n };\n /**\n * @inheritDoc\n */\n Dedupe.id = 'Dedupe';\n return Dedupe;\n}());\nexport { Dedupe };\n//# sourceMappingURL=dedupe.js.map","/** The status of an event. */\n// eslint-disable-next-line import/export\nexport var Status;\n(function (Status) {\n /** The status could not be determined. */\n Status[\"Unknown\"] = \"unknown\";\n /** The event was skipped due to configuration or callbacks. */\n Status[\"Skipped\"] = \"skipped\";\n /** The event was sent to Sentry successfully. */\n Status[\"Success\"] = \"success\";\n /** The client is currently rate limited and will try again later. */\n Status[\"RateLimit\"] = \"rate_limit\";\n /** The event could not be processed. */\n Status[\"Invalid\"] = \"invalid\";\n /** A server-side error occurred during submission. */\n Status[\"Failed\"] = \"failed\";\n})(Status || (Status = {}));\n// eslint-disable-next-line @typescript-eslint/no-namespace, import/export\n(function (Status) {\n /**\n * Converts a HTTP status code into a {@link Status}.\n *\n * @param code The HTTP response status code.\n * @returns The send status or {@link Status.Unknown}.\n */\n function fromHttpCode(code) {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n if (code === 429) {\n return Status.RateLimit;\n }\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n if (code >= 500) {\n return Status.Failed;\n }\n return Status.Unknown;\n }\n Status.fromHttpCode = fromHttpCode;\n})(Status || (Status = {}));\n//# sourceMappingURL=status.js.map","/**\n * Session Status\n */\nexport var SessionStatus;\n(function (SessionStatus) {\n /** JSDoc */\n SessionStatus[\"Ok\"] = \"ok\";\n /** JSDoc */\n SessionStatus[\"Exited\"] = \"exited\";\n /** JSDoc */\n SessionStatus[\"Crashed\"] = \"crashed\";\n /** JSDoc */\n SessionStatus[\"Abnormal\"] = \"abnormal\";\n})(SessionStatus || (SessionStatus = {}));\nexport var RequestSessionStatus;\n(function (RequestSessionStatus) {\n /** JSDoc */\n RequestSessionStatus[\"Ok\"] = \"ok\";\n /** JSDoc */\n RequestSessionStatus[\"Errored\"] = \"errored\";\n /** JSDoc */\n RequestSessionStatus[\"Crashed\"] = \"crashed\";\n})(RequestSessionStatus || (RequestSessionStatus = {}));\n//# sourceMappingURL=session.js.map","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { isInstanceOf } from '@sentry/utils';\nimport { exceptionFromStacktrace } from '../parsers';\nimport { computeStackTrace } from '../tracekit';\nvar DEFAULT_KEY = 'cause';\nvar DEFAULT_LIMIT = 5;\n/** Adds SDK info to an event. */\nvar LinkedErrors = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function LinkedErrors(options) {\n if (options === void 0) { options = {}; }\n /**\n * @inheritDoc\n */\n this.name = LinkedErrors.id;\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n /**\n * @inheritDoc\n */\n LinkedErrors.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event, hint) {\n var self = getCurrentHub().getIntegration(LinkedErrors);\n if (self) {\n var handler = self._handler && self._handler.bind(self);\n return typeof handler === 'function' ? handler(event, hint) : event;\n }\n return event;\n });\n };\n /**\n * @inheritDoc\n */\n LinkedErrors.prototype._handler = function (event, hint) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n var linkedErrors = this._walkErrorTree(hint.originalException, this._key);\n event.exception.values = __spread(linkedErrors, event.exception.values);\n return event;\n };\n /**\n * @inheritDoc\n */\n LinkedErrors.prototype._walkErrorTree = function (error, key, stack) {\n if (stack === void 0) { stack = []; }\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n return stack;\n }\n var stacktrace = computeStackTrace(error[key]);\n var exception = exceptionFromStacktrace(stacktrace);\n return this._walkErrorTree(error[key], key, __spread([exception], stack));\n };\n /**\n * @inheritDoc\n */\n LinkedErrors.id = 'LinkedErrors';\n return LinkedErrors;\n}());\nexport { LinkedErrors };\n//# sourceMappingURL=linkederrors.js.map","import { SentryError } from './error';\nimport { SyncPromise } from './syncpromise';\n/** A simple queue that holds promises. */\nvar PromiseBuffer = /** @class */ (function () {\n function PromiseBuffer(_limit) {\n this._limit = _limit;\n /** Internal set of queued Promises */\n this._buffer = [];\n }\n /**\n * Says if the buffer is ready to take more requests\n */\n PromiseBuffer.prototype.isReady = function () {\n return this._limit === undefined || this.length() < this._limit;\n };\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task:\n * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n PromiseBuffer.prototype.add = function (taskProducer) {\n var _this = this;\n if (!this.isReady()) {\n return SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n // start the task and add its promise to the queue\n var task = taskProducer();\n if (this._buffer.indexOf(task) === -1) {\n this._buffer.push(task);\n }\n void task\n .then(function () { return _this.remove(task); })\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, function () {\n return _this.remove(task).then(null, function () {\n // We have to add another catch here because `this.remove()` starts a new promise chain.\n });\n });\n return task;\n };\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n PromiseBuffer.prototype.remove = function (task) {\n var removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0];\n return removedTask;\n };\n /**\n * This function returns the number of unresolved promises in the queue.\n */\n PromiseBuffer.prototype.length = function () {\n return this._buffer.length;\n };\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n PromiseBuffer.prototype.drain = function (timeout) {\n var _this = this;\n return new SyncPromise(function (resolve) {\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n var capturedSetTimeout = setTimeout(function () {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n // if all promises resolve in time, cancel the timer and resolve to `true`\n void SyncPromise.all(_this._buffer)\n .then(function () {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n })\n .then(null, function () {\n resolve(true);\n });\n });\n };\n return PromiseBuffer;\n}());\nexport { PromiseBuffer };\n//# sourceMappingURL=promisebuffer.js.map","import { __assign, __read, __values } from \"tslib\";\nimport { API } from '@sentry/core';\nimport { Status, } from '@sentry/types';\nimport { dateTimestampInSeconds, getGlobalObject, logger, parseRetryAfterHeader, PromiseBuffer, SentryError, } from '@sentry/utils';\nimport { sendReport } from './utils';\nvar CATEGORY_MAPPING = {\n event: 'error',\n transaction: 'transaction',\n session: 'session',\n attachment: 'attachment',\n};\nvar global = getGlobalObject();\n/** Base Transport class implementation */\nvar BaseTransport = /** @class */ (function () {\n function BaseTransport(options) {\n var _this = this;\n this.options = options;\n /** A simple buffer holding all requests. */\n this._buffer = new PromiseBuffer(30);\n /** Locks transport after receiving rate limits in a response */\n this._rateLimits = {};\n this._outcomes = {};\n this._api = new API(options.dsn, options._metadata, options.tunnel);\n // eslint-disable-next-line deprecation/deprecation\n this.url = this._api.getStoreEndpointWithUrlEncodedAuth();\n if (this.options.sendClientReports && global.document) {\n global.document.addEventListener('visibilitychange', function () {\n if (global.document.visibilityState === 'hidden') {\n _this._flushOutcomes();\n }\n });\n }\n }\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.sendEvent = function (_) {\n throw new SentryError('Transport Class has to implement `sendEvent` method');\n };\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.close = function (timeout) {\n return this._buffer.drain(timeout);\n };\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.recordLostEvent = function (reason, category) {\n var _a;\n if (!this.options.sendClientReports) {\n return;\n }\n // We want to track each category (event, transaction, session) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial>>>`\n var key = CATEGORY_MAPPING[category] + \":\" + reason;\n logger.log(\"Adding outcome: \" + key);\n this._outcomes[key] = (_a = this._outcomes[key], (_a !== null && _a !== void 0 ? _a : 0)) + 1;\n };\n /**\n * Send outcomes as an envelope\n */\n BaseTransport.prototype._flushOutcomes = function () {\n if (!this.options.sendClientReports) {\n return;\n }\n var outcomes = this._outcomes;\n this._outcomes = {};\n // Nothing to send\n if (!Object.keys(outcomes).length) {\n logger.log('No outcomes to flush');\n return;\n }\n logger.log(\"Flushing outcomes:\\n\" + JSON.stringify(outcomes, null, 2));\n var url = this._api.getEnvelopeEndpointWithUrlEncodedAuth();\n // Envelope header is required to be at least an empty object\n var envelopeHeader = JSON.stringify(__assign({}, (this.options.tunnel && { dsn: this._api.getDsn().toString() })));\n var itemHeaders = JSON.stringify({\n type: 'client_report',\n });\n var item = JSON.stringify({\n timestamp: dateTimestampInSeconds(),\n discarded_events: Object.keys(outcomes).map(function (key) {\n var _a = __read(key.split(':'), 2), category = _a[0], reason = _a[1];\n return {\n reason: reason,\n category: category,\n quantity: outcomes[key],\n };\n }),\n });\n var envelope = envelopeHeader + \"\\n\" + itemHeaders + \"\\n\" + item;\n try {\n sendReport(url, envelope);\n }\n catch (e) {\n logger.error(e);\n }\n };\n /**\n * Handle Sentry repsonse for promise-based transports.\n */\n BaseTransport.prototype._handleResponse = function (_a) {\n var requestType = _a.requestType, response = _a.response, headers = _a.headers, resolve = _a.resolve, reject = _a.reject;\n var status = Status.fromHttpCode(response.status);\n /**\n * \"The name is case-insensitive.\"\n * https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n */\n var limited = this._handleRateLimit(headers);\n if (limited)\n logger.warn(\"Too many \" + requestType + \" requests, backing off until: \" + this._disabledUntil(requestType));\n if (status === Status.Success) {\n resolve({ status: status });\n return;\n }\n reject(response);\n };\n /**\n * Gets the time that given category is disabled until for rate limiting\n */\n BaseTransport.prototype._disabledUntil = function (requestType) {\n var category = CATEGORY_MAPPING[requestType];\n return this._rateLimits[category] || this._rateLimits.all;\n };\n /**\n * Checks if a category is rate limited\n */\n BaseTransport.prototype._isRateLimited = function (requestType) {\n return this._disabledUntil(requestType) > new Date(Date.now());\n };\n /**\n * Sets internal _rateLimits from incoming headers. Returns true if headers contains a non-empty rate limiting header.\n */\n BaseTransport.prototype._handleRateLimit = function (headers) {\n var e_1, _a, e_2, _b;\n var now = Date.now();\n var rlHeader = headers['x-sentry-rate-limits'];\n var raHeader = headers['retry-after'];\n if (rlHeader) {\n try {\n // rate limit headers are of the form\n //
,
,..\n // where each
is of the form\n // : : : \n // where\n // is a delay in ms\n // is the event type(s) (error, transaction, etc) being rate limited and is of the form\n // ;;...\n // is what's being limited (org, project, or key) - ignored by SDK\n // is an arbitrary string like \"org_quota\" - ignored by SDK\n for (var _c = __values(rlHeader.trim().split(',')), _d = _c.next(); !_d.done; _d = _c.next()) {\n var limit = _d.value;\n var parameters = limit.split(':', 2);\n var headerDelay = parseInt(parameters[0], 10);\n var delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n try {\n for (var _e = (e_2 = void 0, __values(parameters[1].split(';'))), _f = _e.next(); !_f.done; _f = _e.next()) {\n var category = _f.value;\n this._rateLimits[category || 'all'] = new Date(now + delay);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_b = _e.return)) _b.call(_e);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return true;\n }\n else if (raHeader) {\n this._rateLimits.all = new Date(now + parseRetryAfterHeader(now, raHeader));\n return true;\n }\n return false;\n };\n return BaseTransport;\n}());\nexport { BaseTransport };\n//# sourceMappingURL=base.js.map","/** The status of an Span. */\n// eslint-disable-next-line import/export\nexport var SpanStatus;\n(function (SpanStatus) {\n /** The operation completed successfully. */\n SpanStatus[\"Ok\"] = \"ok\";\n /** Deadline expired before operation could complete. */\n SpanStatus[\"DeadlineExceeded\"] = \"deadline_exceeded\";\n /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */\n SpanStatus[\"Unauthenticated\"] = \"unauthenticated\";\n /** 403 Forbidden */\n SpanStatus[\"PermissionDenied\"] = \"permission_denied\";\n /** 404 Not Found. Some requested entity (file or directory) was not found. */\n SpanStatus[\"NotFound\"] = \"not_found\";\n /** 429 Too Many Requests */\n SpanStatus[\"ResourceExhausted\"] = \"resource_exhausted\";\n /** Client specified an invalid argument. 4xx. */\n SpanStatus[\"InvalidArgument\"] = \"invalid_argument\";\n /** 501 Not Implemented */\n SpanStatus[\"Unimplemented\"] = \"unimplemented\";\n /** 503 Service Unavailable */\n SpanStatus[\"Unavailable\"] = \"unavailable\";\n /** Other/generic 5xx. */\n SpanStatus[\"InternalError\"] = \"internal_error\";\n /** Unknown. Any non-standard HTTP status code. */\n SpanStatus[\"UnknownError\"] = \"unknown_error\";\n /** The operation was cancelled (typically by the user). */\n SpanStatus[\"Cancelled\"] = \"cancelled\";\n /** Already exists (409) */\n SpanStatus[\"AlreadyExists\"] = \"already_exists\";\n /** Operation was rejected because the system is not in a state required for the operation's */\n SpanStatus[\"FailedPrecondition\"] = \"failed_precondition\";\n /** The operation was aborted, typically due to a concurrency issue. */\n SpanStatus[\"Aborted\"] = \"aborted\";\n /** Operation was attempted past the valid range. */\n SpanStatus[\"OutOfRange\"] = \"out_of_range\";\n /** Unrecoverable data loss or corruption */\n SpanStatus[\"DataLoss\"] = \"data_loss\";\n})(SpanStatus || (SpanStatus = {}));\n// eslint-disable-next-line @typescript-eslint/no-namespace, import/export\n(function (SpanStatus) {\n /**\n * Converts a HTTP status code into a {@link SpanStatus}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or {@link SpanStatus.UnknownError}.\n */\n function fromHttpCode(httpStatus) {\n if (httpStatus < 400 && httpStatus >= 100) {\n return SpanStatus.Ok;\n }\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return SpanStatus.Unauthenticated;\n case 403:\n return SpanStatus.PermissionDenied;\n case 404:\n return SpanStatus.NotFound;\n case 409:\n return SpanStatus.AlreadyExists;\n case 413:\n return SpanStatus.FailedPrecondition;\n case 429:\n return SpanStatus.ResourceExhausted;\n default:\n return SpanStatus.InvalidArgument;\n }\n }\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return SpanStatus.Unimplemented;\n case 503:\n return SpanStatus.Unavailable;\n case 504:\n return SpanStatus.DeadlineExceeded;\n default:\n return SpanStatus.InternalError;\n }\n }\n return SpanStatus.UnknownError;\n }\n SpanStatus.fromHttpCode = fromHttpCode;\n})(SpanStatus || (SpanStatus = {}));\n//# sourceMappingURL=spanstatus.js.map","/**\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 */\nimport { isNodeEnv } from './node';\nvar fallbackGlobalObject = {};\n/**\n * Safely get global scope object\n *\n * @returns Global scope object\n */\nexport function getGlobalObject() {\n return (isNodeEnv()\n ? global\n : typeof window !== 'undefined' // eslint-disable-line no-restricted-globals\n ? window // eslint-disable-line no-restricted-globals\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject);\n}\n//# sourceMappingURL=global.js.map","import { getGlobalObject } from './global';\nimport { logger } from './logger';\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent() {\n try {\n new ErrorEvent('');\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException() {\n try {\n new DOMException('');\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch() {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n try {\n new Headers();\n new Request('');\n new Response();\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch() {\n if (!supportsFetch()) {\n return false;\n }\n var global = getGlobalObject();\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(global.fetch)) {\n return true;\n }\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n var result = false;\n var doc = global.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof doc.createElement === \"function\") {\n try {\n var sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n }\n catch (err) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n return result;\n}\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver() {\n return 'ReportingObserver' in getGlobalObject();\n}\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n if (!supportsFetch()) {\n return false;\n }\n try {\n new Request('_', {\n referrerPolicy: 'origin',\n });\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory() {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n var global = getGlobalObject();\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var chrome = global.chrome;\n var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n var hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n return !isChromePackagedApp && hasHistoryApi;\n}\n//# sourceMappingURL=supports.js.map","/** JSDoc */\n// eslint-disable-next-line import/export\nexport var Severity;\n(function (Severity) {\n /** JSDoc */\n Severity[\"Fatal\"] = \"fatal\";\n /** JSDoc */\n Severity[\"Error\"] = \"error\";\n /** JSDoc */\n Severity[\"Warning\"] = \"warning\";\n /** JSDoc */\n Severity[\"Log\"] = \"log\";\n /** JSDoc */\n Severity[\"Info\"] = \"info\";\n /** JSDoc */\n Severity[\"Debug\"] = \"debug\";\n /** JSDoc */\n Severity[\"Critical\"] = \"critical\";\n})(Severity || (Severity = {}));\n// eslint-disable-next-line @typescript-eslint/no-namespace, import/export\n(function (Severity) {\n /**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\n function fromString(level) {\n switch (level) {\n case 'debug':\n return Severity.Debug;\n case 'info':\n return Severity.Info;\n case 'warn':\n case 'warning':\n return Severity.Warning;\n case 'error':\n return Severity.Error;\n case 'fatal':\n return Severity.Fatal;\n case 'critical':\n return Severity.Critical;\n case 'log':\n default:\n return Severity.Log;\n }\n }\n Severity.fromString = fromString;\n})(Severity || (Severity = {}));\n//# sourceMappingURL=severity.js.map","import { forget, getGlobalObject, isNativeFetch, logger, supportsFetch } from '@sentry/utils';\nvar global = getGlobalObject();\nvar cachedFetchImpl;\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nexport function getNativeFetchImplementation() {\n var _a, _b;\n if (cachedFetchImpl) {\n return cachedFetchImpl;\n }\n /* eslint-disable @typescript-eslint/unbound-method */\n // Fast path to avoid DOM I/O\n if (isNativeFetch(global.fetch)) {\n return (cachedFetchImpl = global.fetch.bind(global));\n }\n var document = global.document;\n var fetchImpl = global.fetch;\n // eslint-disable-next-line deprecation/deprecation\n if (typeof ((_a = document) === null || _a === void 0 ? void 0 : _a.createElement) === \"function\") {\n try {\n var sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n if ((_b = sandbox.contentWindow) === null || _b === void 0 ? void 0 : _b.fetch) {\n fetchImpl = sandbox.contentWindow.fetch;\n }\n document.head.removeChild(sandbox);\n }\n catch (e) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);\n }\n }\n return (cachedFetchImpl = fetchImpl.bind(global));\n /* eslint-enable @typescript-eslint/unbound-method */\n}\n/**\n * Sends sdk client report using sendBeacon or fetch as a fallback if available\n *\n * @param url report endpoint\n * @param body report payload\n */\nexport function sendReport(url, body) {\n var isRealNavigator = Object.prototype.toString.call(global && global.navigator) === '[object Navigator]';\n var hasSendBeacon = isRealNavigator && typeof global.navigator.sendBeacon === 'function';\n if (hasSendBeacon) {\n // Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch\n var sendBeacon = global.navigator.sendBeacon.bind(global.navigator);\n return sendBeacon(url, body);\n }\n if (supportsFetch()) {\n var fetch_1 = getNativeFetchImplementation();\n return forget(fetch_1(url, {\n body: body,\n method: 'POST',\n credentials: 'omit',\n keepalive: true,\n }));\n }\n}\n//# sourceMappingURL=utils.js.map","/**\n * Consumes the promise and logs the error when it rejects.\n * @param promise A promise to forget.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function forget(promise) {\n void promise.then(null, function (e) {\n // TODO: Use a better logging mechanism\n // eslint-disable-next-line no-console\n console.error(e);\n });\n}\n//# sourceMappingURL=async.js.map","import { Status } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n/** Noop transport */\nvar NoopTransport = /** @class */ (function () {\n function NoopTransport() {\n }\n /**\n * @inheritDoc\n */\n NoopTransport.prototype.sendEvent = function (_) {\n return SyncPromise.resolve({\n reason: \"NoopTransport: Event has been skipped because no Dsn is configured.\",\n status: Status.Skipped,\n });\n };\n /**\n * @inheritDoc\n */\n NoopTransport.prototype.close = function (_) {\n return SyncPromise.resolve(true);\n };\n return NoopTransport;\n}());\nexport { NoopTransport };\n//# sourceMappingURL=noop.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { dateTimestampInSeconds, getGlobalObject, isPlainObject, isThenable, SyncPromise } from '@sentry/utils';\n/**\n * Absolute maximum number of breadcrumbs added to an event.\n * The `maxBreadcrumbs` option cannot be higher than this value.\n */\nvar MAX_BREADCRUMBS = 100;\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nvar Scope = /** @class */ (function () {\n function Scope() {\n /** Flag if notifying is happening. */\n this._notifyingListeners = false;\n /** Callback for client to receive scope changes. */\n this._scopeListeners = [];\n /** Callback list that will be called after {@link applyToEvent}. */\n this._eventProcessors = [];\n /** Array of breadcrumbs. */\n this._breadcrumbs = [];\n /** User */\n this._user = {};\n /** Tags */\n this._tags = {};\n /** Extra */\n this._extra = {};\n /** Contexts */\n this._contexts = {};\n }\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n Scope.clone = function (scope) {\n var newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = __spread(scope._breadcrumbs);\n newScope._tags = __assign({}, scope._tags);\n newScope._extra = __assign({}, scope._extra);\n newScope._contexts = __assign({}, 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 = __spread(scope._eventProcessors);\n newScope._requestSession = scope._requestSession;\n }\n return newScope;\n };\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n Scope.prototype.addScopeListener = function (callback) {\n this._scopeListeners.push(callback);\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.addEventProcessor = function (callback) {\n this._eventProcessors.push(callback);\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setUser = function (user) {\n this._user = user || {};\n if (this._session) {\n this._session.update({ user: user });\n }\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getUser = function () {\n return this._user;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getRequestSession = function () {\n return this._requestSession;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setRequestSession = function (requestSession) {\n this._requestSession = requestSession;\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setTags = function (tags) {\n this._tags = __assign(__assign({}, this._tags), tags);\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setTag = function (key, value) {\n var _a;\n this._tags = __assign(__assign({}, this._tags), (_a = {}, _a[key] = value, _a));\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setExtras = function (extras) {\n this._extra = __assign(__assign({}, this._extra), extras);\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setExtra = function (key, extra) {\n var _a;\n this._extra = __assign(__assign({}, this._extra), (_a = {}, _a[key] = extra, _a));\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setFingerprint = function (fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setLevel = function (level) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setTransactionName = function (name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * Can be removed in major version.\n * @deprecated in favor of {@link this.setTransactionName}\n */\n Scope.prototype.setTransaction = function (name) {\n return this.setTransactionName(name);\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setContext = function (key, context) {\n var _a;\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n }\n else {\n this._contexts = __assign(__assign({}, this._contexts), (_a = {}, _a[key] = context, _a));\n }\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setSpan = function (span) {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getSpan = function () {\n return this._span;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getTransaction = function () {\n var _a, _b, _c, _d;\n // often, this span will be a transaction, but it's not guaranteed to be\n var span = this.getSpan();\n // try it the new way first\n if ((_a = span) === null || _a === void 0 ? void 0 : _a.transaction) {\n return (_b = span) === null || _b === void 0 ? void 0 : _b.transaction;\n }\n // fallback to the old way (known bug: this only finds transactions with sampled = true)\n if ((_d = (_c = span) === null || _c === void 0 ? void 0 : _c.spanRecorder) === null || _d === void 0 ? void 0 : _d.spans[0]) {\n return span.spanRecorder.spans[0];\n }\n // neither way found a transaction\n return undefined;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setSession = function (session) {\n if (!session) {\n delete this._session;\n }\n else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getSession = function () {\n return this._session;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.update = function (captureContext) {\n if (!captureContext) {\n return this;\n }\n if (typeof captureContext === 'function') {\n var updatedScope = captureContext(this);\n return updatedScope instanceof Scope ? updatedScope : this;\n }\n if (captureContext instanceof Scope) {\n this._tags = __assign(__assign({}, this._tags), captureContext._tags);\n this._extra = __assign(__assign({}, this._extra), captureContext._extra);\n this._contexts = __assign(__assign({}, 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 }\n else if (isPlainObject(captureContext)) {\n // eslint-disable-next-line no-param-reassign\n captureContext = captureContext;\n this._tags = __assign(__assign({}, this._tags), captureContext.tags);\n this._extra = __assign(__assign({}, this._extra), captureContext.extra);\n this._contexts = __assign(__assign({}, 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 }\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.clear = function () {\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 return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.addBreadcrumb = function (breadcrumb, maxBreadcrumbs) {\n var maxCrumbs = typeof maxBreadcrumbs === 'number' ? Math.min(maxBreadcrumbs, MAX_BREADCRUMBS) : MAX_BREADCRUMBS;\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n var mergedBreadcrumb = __assign({ timestamp: dateTimestampInSeconds() }, breadcrumb);\n this._breadcrumbs = __spread(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxCrumbs);\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.clearBreadcrumbs = function () {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n };\n /**\n * Applies the current context and fingerprint to the event.\n * Note that breadcrumbs will be added by the client.\n * Also if the event has already breadcrumbs on it, we do not merge them.\n * @param event Event\n * @param hint May contain additional information about the original exception.\n * @hidden\n */\n Scope.prototype.applyToEvent = function (event, hint) {\n var _a;\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = __assign(__assign({}, this._extra), event.extra);\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = __assign(__assign({}, this._tags), event.tags);\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = __assign(__assign({}, this._user), event.user);\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = __assign(__assign({}, 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 // 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 = __assign({ trace: this._span.getTraceContext() }, event.contexts);\n var transactionName = (_a = this._span.transaction) === null || _a === void 0 ? void 0 : _a.name;\n if (transactionName) {\n event.tags = __assign({ transaction: transactionName }, event.tags);\n }\n }\n this._applyFingerprint(event);\n event.breadcrumbs = __spread((event.breadcrumbs || []), this._breadcrumbs);\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n return this._notifyEventProcessors(__spread(getGlobalEventProcessors(), this._eventProcessors), event, hint);\n };\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n Scope.prototype._notifyEventProcessors = function (processors, event, hint, index) {\n var _this = this;\n if (index === void 0) { index = 0; }\n return new SyncPromise(function (resolve, reject) {\n var processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n }\n else {\n var result = processor(__assign({}, event), hint);\n if (isThenable(result)) {\n void result\n .then(function (final) { return _this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve); })\n .then(null, reject);\n }\n else {\n void _this._notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n };\n /**\n * This will be called on every set call.\n */\n Scope.prototype._notifyScopeListeners = function () {\n var _this = this;\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(function (callback) {\n callback(_this);\n });\n this._notifyingListeners = false;\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 Scope.prototype._applyFingerprint = function (event) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [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 // 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 return Scope;\n}());\nexport { Scope };\n/**\n * Returns the global event processors.\n */\nfunction getGlobalEventProcessors() {\n /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n var global = getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n}\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}\n//# sourceMappingURL=scope.js.map","import { getGlobalObject } from './global';\nimport { isString } from './is';\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 */\nexport function htmlTreeAsString(elem, keyAttrs) {\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 var currentElem = elem;\n var MAX_TRAVERSE_HEIGHT = 5;\n var MAX_OUTPUT_LEN = 80;\n var out = [];\n var height = 0;\n var len = 0;\n var separator = ' > ';\n var sepLength = separator.length;\n var nextStr = void 0;\n // eslint-disable-next-line no-plusplus\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 MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {\n break;\n }\n out.push(nextStr);\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n return out.reverse().join(separator);\n }\n catch (_oO) {\n return '';\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 var _a, _b;\n var elem = el;\n var out = [];\n var className;\n var classes;\n var key;\n var attr;\n var i;\n if (!elem || !elem.tagName) {\n return '';\n }\n out.push(elem.tagName.toLowerCase());\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n var keyAttrPairs = ((_a = keyAttrs) === null || _a === void 0 ? void 0 : _a.length) ? keyAttrs.filter(function (keyAttr) { return elem.getAttribute(keyAttr); }).map(function (keyAttr) { return [keyAttr, elem.getAttribute(keyAttr)]; })\n : null;\n if ((_b = keyAttrPairs) === null || _b === void 0 ? void 0 : _b.length) {\n keyAttrPairs.forEach(function (keyAttrPair) {\n out.push(\"[\" + keyAttrPair[0] + \"=\\\"\" + keyAttrPair[1] + \"\\\"]\");\n });\n }\n else {\n if (elem.id) {\n out.push(\"#\" + elem.id);\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 var allowedAttrs = ['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 * A safe form of location.href\n */\nexport function getLocationHref() {\n var global = getGlobalObject();\n try {\n return global.document.location.href;\n }\n catch (oO) {\n return '';\n }\n}\n//# sourceMappingURL=browser.js.map","import { logger } from '@sentry/utils';\n/** Deduplication filter */\nvar Dedupe = /** @class */ (function () {\n function Dedupe() {\n /**\n * @inheritDoc\n */\n this.name = Dedupe.id;\n }\n /**\n * @inheritDoc\n */\n Dedupe.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) {\n addGlobalEventProcessor(function (currentEvent) {\n var self = getCurrentHub().getIntegration(Dedupe);\n if (self) {\n // Juuust in case something goes wrong\n try {\n if (self._shouldDropEvent(currentEvent, self._previousEvent)) {\n logger.warn(\"Event dropped due to being a duplicate of previously captured event.\");\n return null;\n }\n }\n catch (_oO) {\n return (self._previousEvent = currentEvent);\n }\n return (self._previousEvent = currentEvent);\n }\n return currentEvent;\n });\n };\n /** JSDoc */\n Dedupe.prototype._shouldDropEvent = function (currentEvent, previousEvent) {\n if (!previousEvent) {\n return false;\n }\n if (this._isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n if (this._isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n return false;\n };\n /** JSDoc */\n Dedupe.prototype._isSameMessageEvent = function (currentEvent, previousEvent) {\n var currentMessage = currentEvent.message;\n var previousMessage = previousEvent.message;\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n if (currentMessage !== previousMessage) {\n return false;\n }\n if (!this._isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n if (!this._isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n return true;\n };\n /** JSDoc */\n Dedupe.prototype._getFramesFromEvent = function (event) {\n var exception = event.exception;\n if (exception) {\n try {\n // @ts-ignore Object could be undefined\n return exception.values[0].stacktrace.frames;\n }\n catch (_oO) {\n return undefined;\n }\n }\n else if (event.stacktrace) {\n return event.stacktrace.frames;\n }\n return undefined;\n };\n /** JSDoc */\n Dedupe.prototype._isSameStacktrace = function (currentEvent, previousEvent) {\n var currentFrames = this._getFramesFromEvent(currentEvent);\n var previousFrames = this._getFramesFromEvent(previousEvent);\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n currentFrames = currentFrames;\n previousFrames = previousFrames;\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n // Otherwise, compare the two\n for (var i = 0; i < previousFrames.length; i++) {\n var frameA = previousFrames[i];\n var frameB = currentFrames[i];\n if (frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function) {\n return false;\n }\n }\n return true;\n };\n /** JSDoc */\n Dedupe.prototype._getExceptionFromEvent = function (event) {\n return event.exception && event.exception.values && event.exception.values[0];\n };\n /** JSDoc */\n Dedupe.prototype._isSameExceptionEvent = function (currentEvent, previousEvent) {\n var previousException = this._getExceptionFromEvent(previousEvent);\n var currentException = this._getExceptionFromEvent(currentEvent);\n if (!previousException || !currentException) {\n return false;\n }\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n if (!this._isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n if (!this._isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n return true;\n };\n /** JSDoc */\n Dedupe.prototype._isSameFingerprint = function (currentEvent, previousEvent) {\n var currentFingerprint = currentEvent.fingerprint;\n var previousFingerprint = previousEvent.fingerprint;\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n currentFingerprint = currentFingerprint;\n previousFingerprint = previousFingerprint;\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n }\n catch (_oO) {\n return false;\n }\n };\n /**\n * @inheritDoc\n */\n Dedupe.id = 'Dedupe';\n return Dedupe;\n}());\nexport { Dedupe };\n//# sourceMappingURL=dedupe.js.map","import { __assign, __read, __spread } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable max-lines */\nimport { getCurrentHub } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { addInstrumentationHandler, getEventDescription, getGlobalObject, htmlTreeAsString, parseUrl, safeJoin, } from '@sentry/utils';\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nvar Breadcrumbs = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function Breadcrumbs(options) {\n /**\n * @inheritDoc\n */\n this.name = Breadcrumbs.id;\n this._options = __assign({ console: true, dom: true, fetch: true, history: true, sentry: true, xhr: true }, options);\n }\n /**\n * Create a breadcrumb of `sentry` from the events themselves\n */\n Breadcrumbs.prototype.addSentryBreadcrumb = function (event) {\n if (!this._options.sentry) {\n return;\n }\n getCurrentHub().addBreadcrumb({\n category: \"sentry.\" + (event.type === 'transaction' ? 'transaction' : 'event'),\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n }, {\n event: event,\n });\n };\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n Breadcrumbs.prototype.setupOnce = function () {\n var _this = this;\n if (this._options.console) {\n addInstrumentationHandler({\n callback: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this._consoleBreadcrumb.apply(_this, __spread(args));\n },\n type: 'console',\n });\n }\n if (this._options.dom) {\n addInstrumentationHandler({\n callback: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this._domBreadcrumb.apply(_this, __spread(args));\n },\n type: 'dom',\n });\n }\n if (this._options.xhr) {\n addInstrumentationHandler({\n callback: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this._xhrBreadcrumb.apply(_this, __spread(args));\n },\n type: 'xhr',\n });\n }\n if (this._options.fetch) {\n addInstrumentationHandler({\n callback: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this._fetchBreadcrumb.apply(_this, __spread(args));\n },\n type: 'fetch',\n });\n }\n if (this._options.history) {\n addInstrumentationHandler({\n callback: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this._historyBreadcrumb.apply(_this, __spread(args));\n },\n type: 'history',\n });\n }\n };\n /**\n * Creates breadcrumbs from console API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Breadcrumbs.prototype._consoleBreadcrumb = function (handlerData) {\n var breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: Severity.fromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = \"Assertion failed: \" + (safeJoin(handlerData.args.slice(1), ' ') || 'console.assert');\n breadcrumb.data.arguments = handlerData.args.slice(1);\n }\n else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n };\n /**\n * Creates breadcrumbs from DOM API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Breadcrumbs.prototype._domBreadcrumb = function (handlerData) {\n var target;\n var keyAttrs = typeof this._options.dom === 'object' ? this._options.dom.serializeAttribute : undefined;\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target, keyAttrs)\n : htmlTreeAsString(handlerData.event, keyAttrs);\n }\n catch (e) {\n target = '';\n }\n if (target.length === 0) {\n return;\n }\n getCurrentHub().addBreadcrumb({\n category: \"ui.\" + handlerData.name,\n message: target,\n }, {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n });\n };\n /**\n * Creates breadcrumbs from XHR API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Breadcrumbs.prototype._xhrBreadcrumb = function (handlerData) {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n var _a = handlerData.xhr.__sentry_xhr__ || {}, method = _a.method, url = _a.url, status_code = _a.status_code, body = _a.body;\n getCurrentHub().addBreadcrumb({\n category: 'xhr',\n data: {\n method: method,\n url: url,\n status_code: status_code,\n },\n type: 'http',\n }, {\n xhr: handlerData.xhr,\n input: body,\n });\n return;\n }\n };\n /**\n * Creates breadcrumbs from fetch API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Breadcrumbs.prototype._fetchBreadcrumb = function (handlerData) {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb({\n category: 'fetch',\n data: handlerData.fetchData,\n level: Severity.Error,\n type: 'http',\n }, {\n data: handlerData.error,\n input: handlerData.args,\n });\n }\n else {\n getCurrentHub().addBreadcrumb({\n category: 'fetch',\n data: __assign(__assign({}, handlerData.fetchData), { status_code: handlerData.response.status }),\n type: 'http',\n }, {\n input: handlerData.args,\n response: handlerData.response,\n });\n }\n };\n /**\n * Creates breadcrumbs from history API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Breadcrumbs.prototype._historyBreadcrumb = function (handlerData) {\n var global = getGlobalObject();\n var from = handlerData.from;\n var to = handlerData.to;\n var parsedLoc = parseUrl(global.location.href);\n var parsedFrom = parseUrl(from);\n var parsedTo = parseUrl(to);\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from: from,\n to: to,\n },\n });\n };\n /**\n * @inheritDoc\n */\n Breadcrumbs.id = 'Breadcrumbs';\n return Breadcrumbs;\n}());\nexport { Breadcrumbs };\n//# sourceMappingURL=breadcrumbs.js.map","import { __assign, __extends } from \"tslib\";\nimport { BaseBackend } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { supportsFetch } from '@sentry/utils';\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { FetchTransport, XHRTransport } from './transports';\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nvar BrowserBackend = /** @class */ (function (_super) {\n __extends(BrowserBackend, _super);\n function BrowserBackend() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype.eventFromException = function (exception, hint) {\n return eventFromException(this._options, exception, hint);\n };\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype.eventFromMessage = function (message, level, hint) {\n if (level === void 0) { level = Severity.Info; }\n return eventFromMessage(this._options, message, level, hint);\n };\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype._setupTransport = function () {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return _super.prototype._setupTransport.call(this);\n }\n var transportOptions = __assign(__assign({}, this._options.transportOptions), { dsn: this._options.dsn, tunnel: this._options.tunnel, sendClientReports: this._options.sendClientReports, _metadata: this._options._metadata });\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n return new FetchTransport(transportOptions);\n }\n return new XHRTransport(transportOptions);\n };\n return BrowserBackend;\n}(BaseBackend));\nexport { BrowserBackend };\n//# sourceMappingURL=backend.js.map","import { __assign, __extends } from \"tslib\";\nimport { BaseClient, SDK_VERSION } from '@sentry/core';\nimport { getGlobalObject, logger } from '@sentry/utils';\nimport { BrowserBackend } from './backend';\nimport { injectReportDialog } from './helpers';\nimport { Breadcrumbs } from './integrations';\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nvar BrowserClient = /** @class */ (function (_super) {\n __extends(BrowserClient, _super);\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n function BrowserClient(options) {\n if (options === void 0) { options = {}; }\n var _this = this;\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.browser',\n packages: [\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n _this = _super.call(this, BrowserBackend, options) || this;\n return _this;\n }\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n BrowserClient.prototype.showReportDialog = function (options) {\n if (options === void 0) { options = {}; }\n // doesn't work without a document (React Native)\n var document = getGlobalObject().document;\n if (!document) {\n return;\n }\n if (!this._isEnabled()) {\n logger.error('Trying to call showReportDialog with Sentry Client disabled');\n return;\n }\n injectReportDialog(__assign(__assign({}, options), { dsn: options.dsn || this.getDsn() }));\n };\n /**\n * @inheritDoc\n */\n BrowserClient.prototype._prepareEvent = function (event, scope, hint) {\n event.platform = event.platform || 'javascript';\n return _super.prototype._prepareEvent.call(this, event, scope, hint);\n };\n /**\n * @inheritDoc\n */\n BrowserClient.prototype._sendEvent = function (event) {\n var integration = this.getIntegration(Breadcrumbs);\n if (integration) {\n integration.addSentryBreadcrumb(event);\n }\n _super.prototype._sendEvent.call(this, event);\n };\n return BrowserClient;\n}(BaseClient));\nexport { BrowserClient };\n//# sourceMappingURL=client.js.map","import { getCurrentHub } from '@sentry/hub';\nexport var TRACEPARENT_REGEXP = new RegExp('^[ \\\\t]*' + // whitespace\n '([0-9a-f]{32})?' + // trace_id\n '-?([0-9a-f]{16})?' + // span_id\n '-?([01])?' + // sampled\n '[ \\\\t]*$');\n/**\n * Determines if tracing is currently enabled.\n *\n * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.\n */\nexport function hasTracingEnabled(options) {\n if (options === void 0) { options = (_a = getCurrentHub()\n .getClient()) === null || _a === void 0 ? void 0 : _a.getOptions(); }\n var _a;\n return !!options && ('tracesSampleRate' in options || 'tracesSampler' in options);\n}\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */\nexport function extractTraceparentData(traceparent) {\n var matches = traceparent.match(TRACEPARENT_REGEXP);\n if (matches) {\n var parentSampled = void 0;\n if (matches[3] === '1') {\n parentSampled = true;\n }\n else if (matches[3] === '0') {\n parentSampled = false;\n }\n return {\n traceId: matches[1],\n parentSampled: parentSampled,\n parentSpanId: matches[2],\n };\n }\n return undefined;\n}\n/** Grabs active transaction off scope, if any */\nexport function getActiveTransaction(hub) {\n if (hub === void 0) { hub = getCurrentHub(); }\n var _a, _b;\n return (_b = (_a = hub) === null || _a === void 0 ? void 0 : _a.getScope()) === null || _b === void 0 ? void 0 : _b.getTransaction();\n}\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\nexport function msToSec(time) {\n return time / 1000;\n}\n/**\n * Converts from seconds to milliseconds\n * @param time time in seconds\n */\nexport function secToMs(time) {\n return time * 1000;\n}\n// so it can be used in manual instrumentation without necessitating a hard dependency on @sentry/utils\nexport { stripUrlQueryAndFragment } from '@sentry/utils';\n//# sourceMappingURL=utils.js.map","import { getGlobalObject } from './global';\nimport { dynamicRequire, isNodeEnv } from './node';\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 */\nvar dateTimestampSource = {\n nowSeconds: function () { return Date.now() / 1000; },\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 var performance = getGlobalObject().performance;\n if (!performance || !performance.now) {\n return undefined;\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 var timeOrigin = Date.now() - performance.now();\n return {\n now: function () { return performance.now(); },\n timeOrigin: timeOrigin,\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 var perfHooks = dynamicRequire(module, 'perf_hooks');\n return perfHooks.performance;\n }\n catch (_) {\n return undefined;\n }\n}\n/**\n * The Performance API implementation for the current platform, if available.\n */\nvar platformPerformance = isNodeEnv() ? getNodePerformance() : getBrowserPerformance();\nvar timestampSource = platformPerformance === undefined\n ? dateTimestampSource\n : {\n nowSeconds: function () { return (platformPerformance.timeOrigin + platformPerformance.now()) / 1000; },\n };\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\nexport var dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource);\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 */\nexport var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);\n// Re-exported with an old name for backwards-compatibility.\nexport var timestampWithMs = timestampInSeconds;\n/**\n * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.\n */\nexport var usingPerformanceAPI = platformPerformance !== undefined;\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n */\nexport var _browserPerformanceTimeOriginMode;\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 */\nexport var browserPerformanceTimeOrigin = (function () {\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 var performance = getGlobalObject().performance;\n if (!performance || !performance.now) {\n _browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n var threshold = 3600 * 1000;\n var performanceNow = performance.now();\n var dateNow = Date.now();\n // if timeOrigin isn't available set delta to threshold so it isn't used\n var timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n var timeOriginIsReliable = timeOriginDelta < threshold;\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 var navigationStart = performance.timing && performance.timing.navigationStart;\n var hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n var navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n var navigationStartIsReliable = navigationStartDelta < threshold;\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n _browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n }\n else {\n _browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\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//# sourceMappingURL=time.js.map","import { __assign } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { configureScope } from '@sentry/minimal';\nvar ACTION_BREADCRUMB_CATEGORY = 'redux.action';\nvar ACTION_BREADCRUMB_TYPE = 'info';\nvar STATE_CONTEXT_KEY = 'redux.state';\nvar defaultOptions = {\n actionTransformer: function (action) { return action; },\n stateTransformer: function (state) { return state || null; },\n};\n/**\n * Creates an enhancer that would be passed to Redux's createStore to log actions and the latest state to Sentry.\n *\n * @param enhancerOptions Options to pass to the enhancer\n */\nfunction createReduxEnhancer(enhancerOptions) {\n // Note: We return an any type as to not have type conflicts.\n var options = __assign(__assign({}, defaultOptions), enhancerOptions);\n return function (next) { return function (reducer, initialState) {\n var sentryReducer = function (state, action) {\n var newState = reducer(state, action);\n configureScope(function (scope) {\n /* Action breadcrumbs */\n var transformedAction = options.actionTransformer(action);\n if (typeof transformedAction !== 'undefined' && transformedAction !== null) {\n scope.addBreadcrumb({\n category: ACTION_BREADCRUMB_CATEGORY,\n data: transformedAction,\n type: ACTION_BREADCRUMB_TYPE,\n });\n }\n /* Set latest state to scope */\n var transformedState = options.stateTransformer(newState);\n if (typeof transformedState !== 'undefined' && transformedState !== null) {\n scope.setContext(STATE_CONTEXT_KEY, transformedState);\n }\n else {\n scope.setContext(STATE_CONTEXT_KEY, null);\n }\n /* Allow user to configure scope with latest state */\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var configureScopeWithState = options.configureScopeWithState;\n if (typeof configureScopeWithState === 'function') {\n configureScopeWithState(scope, newState);\n }\n });\n return newState;\n };\n return next(sentryReducer, initialState);\n }; };\n}\nexport { createReduxEnhancer };\n//# sourceMappingURL=redux.js.map","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/**\n * Memo class used for decycle json objects. Uses WeakSet if available otherwise array.\n */\nvar Memo = /** @class */ (function () {\n function Memo() {\n this._hasWeakSet = typeof WeakSet === 'function';\n this._inner = this._hasWeakSet ? new WeakSet() : [];\n }\n /**\n * Sets obj to remember.\n * @param obj Object to remember\n */\n Memo.prototype.memoize = function (obj) {\n if (this._hasWeakSet) {\n if (this._inner.has(obj)) {\n return true;\n }\n this._inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (var i = 0; i < this._inner.length; i++) {\n var value = this._inner[i];\n if (value === obj) {\n return true;\n }\n }\n this._inner.push(obj);\n return false;\n };\n /**\n * Removes object from internal storage.\n * @param obj Object to forget\n */\n Memo.prototype.unmemoize = function (obj) {\n if (this._hasWeakSet) {\n this._inner.delete(obj);\n }\n else {\n for (var i = 0; i < this._inner.length; i++) {\n if (this._inner[i] === obj) {\n this._inner.splice(i, 1);\n break;\n }\n }\n }\n };\n return Memo;\n}());\nexport { Memo };\n//# sourceMappingURL=memo.js.map","import { SessionStatus } from '@sentry/types';\nimport { dropUndefinedKeys, timestampInSeconds, uuid4 } from '@sentry/utils';\n/**\n * @inheritdoc\n */\nvar Session = /** @class */ (function () {\n function Session(context) {\n this.errors = 0;\n this.sid = uuid4();\n this.duration = 0;\n this.status = SessionStatus.Ok;\n this.init = true;\n this.ignoreDuration = false;\n // Both timestamp and started are in seconds since the UNIX epoch.\n var startingTime = timestampInSeconds();\n this.timestamp = startingTime;\n this.started = startingTime;\n if (context) {\n this.update(context);\n }\n }\n /** JSDoc */\n // eslint-disable-next-line complexity\n Session.prototype.update = function (context) {\n if (context === void 0) { context = {}; }\n if (context.user) {\n if (!this.ipAddress && context.user.ip_address) {\n this.ipAddress = context.user.ip_address;\n }\n if (!this.did && !context.did) {\n this.did = context.user.id || context.user.email || context.user.username;\n }\n }\n this.timestamp = context.timestamp || timestampInSeconds();\n if (context.ignoreDuration) {\n this.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n this.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n this.init = context.init;\n }\n if (!this.did && context.did) {\n this.did = \"\" + context.did;\n }\n if (typeof context.started === 'number') {\n this.started = context.started;\n }\n if (this.ignoreDuration) {\n this.duration = undefined;\n }\n else if (typeof context.duration === 'number') {\n this.duration = context.duration;\n }\n else {\n var duration = this.timestamp - this.started;\n this.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n this.release = context.release;\n }\n if (context.environment) {\n this.environment = context.environment;\n }\n if (!this.ipAddress && context.ipAddress) {\n this.ipAddress = context.ipAddress;\n }\n if (!this.userAgent && context.userAgent) {\n this.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n this.errors = context.errors;\n }\n if (context.status) {\n this.status = context.status;\n }\n };\n /** JSDoc */\n Session.prototype.close = function (status) {\n if (status) {\n this.update({ status: status });\n }\n else if (this.status === SessionStatus.Ok) {\n this.update({ status: SessionStatus.Exited });\n }\n else {\n this.update();\n }\n };\n /** JSDoc */\n Session.prototype.toJSON = function () {\n return dropUndefinedKeys({\n sid: \"\" + this.sid,\n init: this.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(this.started * 1000).toISOString(),\n timestamp: new Date(this.timestamp * 1000).toISOString(),\n status: this.status,\n errors: this.errors,\n did: typeof this.did === 'number' || typeof this.did === 'string' ? \"\" + this.did : undefined,\n duration: this.duration,\n attrs: dropUndefinedKeys({\n release: this.release,\n environment: this.environment,\n ip_address: this.ipAddress,\n user_agent: this.userAgent,\n }),\n });\n };\n return Session;\n}());\nexport { Session };\n//# sourceMappingURL=session.js.map","import { __assign, __read, __spread } from \"tslib\";\n/* eslint-disable max-lines */\nimport { SessionStatus, } from '@sentry/types';\nimport { consoleSandbox, dateTimestampInSeconds, getGlobalObject, isNodeEnv, logger, uuid4 } from '@sentry/utils';\nimport { Scope } from './scope';\nimport { Session } from './session';\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 */\nexport var API_VERSION = 4;\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nvar DEFAULT_BREADCRUMBS = 100;\n/**\n * @inheritDoc\n */\nvar Hub = /** @class */ (function () {\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 function Hub(client, scope, _version) {\n if (scope === void 0) { scope = new Scope(); }\n if (_version === void 0) { _version = API_VERSION; }\n this._version = _version;\n /** Is a {@link Layer}[] containing the client and scope */\n this._stack = [{}];\n this.getStackTop().scope = scope;\n if (client) {\n this.bindClient(client);\n }\n }\n /**\n * @inheritDoc\n */\n Hub.prototype.isOlderThan = function (version) {\n return this._version < version;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.bindClient = function (client) {\n var top = this.getStackTop();\n top.client = client;\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.pushScope = function () {\n // We want to clone the content of prev scope\n var scope = Scope.clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope: scope,\n });\n return scope;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.popScope = function () {\n if (this.getStack().length <= 1)\n return false;\n return !!this.getStack().pop();\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.withScope = function (callback) {\n var scope = this.pushScope();\n try {\n callback(scope);\n }\n finally {\n this.popScope();\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.getClient = function () {\n return this.getStackTop().client;\n };\n /** Returns the scope of the top stack. */\n Hub.prototype.getScope = function () {\n return this.getStackTop().scope;\n };\n /** Returns the scope stack for domains or the process. */\n Hub.prototype.getStack = function () {\n return this._stack;\n };\n /** Returns the topmost scope layer in the order domain > local > process. */\n Hub.prototype.getStackTop = function () {\n return this._stack[this._stack.length - 1];\n };\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n Hub.prototype.captureException = function (exception, hint) {\n var eventId = (this._lastEventId = uuid4());\n var finalHint = hint;\n // If there's no explicit hint provided, mimic the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n var syntheticException = void 0;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n finalHint = {\n originalException: exception,\n syntheticException: syntheticException,\n };\n }\n this._invokeClient('captureException', exception, __assign(__assign({}, finalHint), { event_id: eventId }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.captureMessage = function (message, level, hint) {\n var eventId = (this._lastEventId = uuid4());\n var finalHint = hint;\n // If there's no explicit hint provided, mimic the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n var syntheticException = void 0;\n try {\n throw new Error(message);\n }\n catch (exception) {\n syntheticException = exception;\n }\n finalHint = {\n originalException: message,\n syntheticException: syntheticException,\n };\n }\n this._invokeClient('captureMessage', message, level, __assign(__assign({}, finalHint), { event_id: eventId }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.captureEvent = function (event, hint) {\n var eventId = uuid4();\n if (event.type !== 'transaction') {\n this._lastEventId = eventId;\n }\n this._invokeClient('captureEvent', event, __assign(__assign({}, hint), { event_id: eventId }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.lastEventId = function () {\n return this._lastEventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.addBreadcrumb = function (breadcrumb, hint) {\n var _a = this.getStackTop(), scope = _a.scope, client = _a.client;\n if (!scope || !client)\n return;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _b = (client.getOptions && client.getOptions()) || {}, _c = _b.beforeBreadcrumb, beforeBreadcrumb = _c === void 0 ? null : _c, _d = _b.maxBreadcrumbs, maxBreadcrumbs = _d === void 0 ? DEFAULT_BREADCRUMBS : _d;\n if (maxBreadcrumbs <= 0)\n return;\n var timestamp = dateTimestampInSeconds();\n var mergedBreadcrumb = __assign({ timestamp: timestamp }, breadcrumb);\n var finalBreadcrumb = beforeBreadcrumb\n ? consoleSandbox(function () { return beforeBreadcrumb(mergedBreadcrumb, hint); })\n : mergedBreadcrumb;\n if (finalBreadcrumb === null)\n return;\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setUser = function (user) {\n var scope = this.getScope();\n if (scope)\n scope.setUser(user);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setTags = function (tags) {\n var scope = this.getScope();\n if (scope)\n scope.setTags(tags);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setExtras = function (extras) {\n var scope = this.getScope();\n if (scope)\n scope.setExtras(extras);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setTag = function (key, value) {\n var scope = this.getScope();\n if (scope)\n scope.setTag(key, value);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setExtra = function (key, extra) {\n var scope = this.getScope();\n if (scope)\n scope.setExtra(key, extra);\n };\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Hub.prototype.setContext = function (name, context) {\n var scope = this.getScope();\n if (scope)\n scope.setContext(name, context);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.configureScope = function (callback) {\n var _a = this.getStackTop(), scope = _a.scope, client = _a.client;\n if (scope && client) {\n callback(scope);\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.run = function (callback) {\n var oldHub = makeMain(this);\n try {\n callback(this);\n }\n finally {\n makeMain(oldHub);\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.getIntegration = function (integration) {\n var client = this.getClient();\n if (!client)\n return null;\n try {\n return client.getIntegration(integration);\n }\n catch (_oO) {\n logger.warn(\"Cannot retrieve integration \" + integration.id + \" from the current Hub\");\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.startSpan = function (context) {\n return this._callExtensionMethod('startSpan', context);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.startTransaction = function (context, customSamplingContext) {\n return this._callExtensionMethod('startTransaction', context, customSamplingContext);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.traceHeaders = function () {\n return this._callExtensionMethod('traceHeaders');\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.captureSession = function (endSession) {\n if (endSession === void 0) { endSession = false; }\n // both send the update and pull the session from the scope\n if (endSession) {\n return this.endSession();\n }\n // only send the update\n this._sendSessionUpdate();\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.endSession = function () {\n var _a, _b, _c, _d, _e;\n (_c = (_b = (_a = this.getStackTop()) === null || _a === void 0 ? void 0 : _a.scope) === null || _b === void 0 ? void 0 : _b.getSession()) === null || _c === void 0 ? void 0 : _c.close();\n this._sendSessionUpdate();\n // the session is over; take it off of the scope\n (_e = (_d = this.getStackTop()) === null || _d === void 0 ? void 0 : _d.scope) === null || _e === void 0 ? void 0 : _e.setSession();\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.startSession = function (context) {\n var _a = this.getStackTop(), scope = _a.scope, client = _a.client;\n var _b = (client && client.getOptions()) || {}, release = _b.release, environment = _b.environment;\n // Will fetch userAgent if called from browser sdk\n var global = getGlobalObject();\n var userAgent = (global.navigator || {}).userAgent;\n var session = new Session(__assign(__assign(__assign({ release: release,\n environment: environment }, (scope && { user: scope.getUser() })), (userAgent && { userAgent: userAgent })), context));\n if (scope) {\n // End existing session if there's one\n var currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === SessionStatus.Ok) {\n currentSession.update({ status: SessionStatus.Exited });\n }\n this.endSession();\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n }\n return session;\n };\n /**\n * Sends the current Session on the scope\n */\n Hub.prototype._sendSessionUpdate = function () {\n var _a = this.getStackTop(), scope = _a.scope, client = _a.client;\n if (!scope)\n return;\n var session = scope.getSession && scope.getSession();\n if (session) {\n if (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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Hub.prototype._invokeClient = function (method) {\n var _a;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var _b = this.getStackTop(), scope = _b.scope, client = _b.client;\n if (client && client[method]) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n (_a = client)[method].apply(_a, __spread(args, [scope]));\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 Hub.prototype._callExtensionMethod = function (method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var carrier = getMainCarrier();\n var sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n logger.warn(\"Extension method \" + method + \" couldn't be found, doing nothing.\");\n };\n return Hub;\n}());\nexport { Hub };\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 **/\nexport function getMainCarrier() {\n var carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub) {\n var registry = getMainCarrier();\n var oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\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 */\nexport function getCurrentHub() {\n // Get main carrier (global for every environment)\n var 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 // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n/**\n * Returns the active domain, if one exists\n * @deprecated No longer used; remove in v7\n * @returns The domain, or undefined if there is no active domain\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function getActiveDomain() {\n logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');\n var sentry = getMainCarrier().__SENTRY__;\n return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n}\n/**\n * Try to read the hub from an active domain, and fallback to the registry if one doesn't exist\n * @returns discovered hub\n */\nfunction getHubFromActiveDomain(registry) {\n var _a, _b, _c;\n try {\n var activeDomain = (_c = (_b = (_a = getMainCarrier().__SENTRY__) === null || _a === void 0 ? void 0 : _a.extensions) === null || _b === void 0 ? void 0 : _b.domain) === null || _c === void 0 ? void 0 : _c.active;\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\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 * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier) {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub)\n return carrier.__SENTRY__.hub;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = new Hub();\n return carrier.__SENTRY__.hub;\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 */\nexport function setHubOnCarrier(carrier, hub) {\n if (!carrier)\n return false;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = hub;\n return true;\n}\n//# sourceMappingURL=hub.js.map","import { __assign } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\nvar global = getGlobalObject();\n/** UserAgent */\nvar UserAgent = /** @class */ (function () {\n function UserAgent() {\n /**\n * @inheritDoc\n */\n this.name = UserAgent.id;\n }\n /**\n * @inheritDoc\n */\n UserAgent.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event) {\n var _a, _b, _c;\n if (getCurrentHub().getIntegration(UserAgent)) {\n // if none of the information we want exists, don't bother\n if (!global.navigator && !global.location && !global.document) {\n return event;\n }\n // grab as much info as exists and add it to the event\n var url = ((_a = event.request) === null || _a === void 0 ? void 0 : _a.url) || ((_b = global.location) === null || _b === void 0 ? void 0 : _b.href);\n var referrer = (global.document || {}).referrer;\n var userAgent = (global.navigator || {}).userAgent;\n var headers = __assign(__assign(__assign({}, (_c = event.request) === null || _c === void 0 ? void 0 : _c.headers), (referrer && { Referer: referrer })), (userAgent && { 'User-Agent': userAgent }));\n var request = __assign(__assign({}, (url && { url: url })), { headers: headers });\n return __assign(__assign({}, event), { request: request });\n }\n return event;\n });\n };\n /**\n * @inheritDoc\n */\n UserAgent.id = 'UserAgent';\n return UserAgent;\n}());\nexport { UserAgent };\n//# sourceMappingURL=useragent.js.map","/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/typedef */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nvar SyncPromise = /** @class */ (function () {\n function SyncPromise(executor) {\n var _this = this;\n this._state = \"PENDING\" /* PENDING */;\n this._handlers = [];\n /** JSDoc */\n this._resolve = function (value) {\n _this._setResult(\"RESOLVED\" /* RESOLVED */, value);\n };\n /** JSDoc */\n this._reject = function (reason) {\n _this._setResult(\"REJECTED\" /* REJECTED */, reason);\n };\n /** JSDoc */\n this._setResult = function (state, value) {\n if (_this._state !== \"PENDING\" /* PENDING */) {\n return;\n }\n if (isThenable(value)) {\n void value.then(_this._resolve, _this._reject);\n return;\n }\n _this._state = state;\n _this._value = value;\n _this._executeHandlers();\n };\n // TODO: FIXME\n /** JSDoc */\n this._attachHandler = function (handler) {\n _this._handlers = _this._handlers.concat(handler);\n _this._executeHandlers();\n };\n /** JSDoc */\n this._executeHandlers = function () {\n if (_this._state === \"PENDING\" /* PENDING */) {\n return;\n }\n var cachedHandlers = _this._handlers.slice();\n _this._handlers = [];\n cachedHandlers.forEach(function (handler) {\n if (handler.done) {\n return;\n }\n if (_this._state === \"RESOLVED\" /* RESOLVED */) {\n if (handler.onfulfilled) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler.onfulfilled(_this._value);\n }\n }\n if (_this._state === \"REJECTED\" /* REJECTED */) {\n if (handler.onrejected) {\n handler.onrejected(_this._value);\n }\n }\n handler.done = true;\n });\n };\n try {\n executor(this._resolve, this._reject);\n }\n catch (e) {\n this._reject(e);\n }\n }\n /** JSDoc */\n SyncPromise.resolve = function (value) {\n return new SyncPromise(function (resolve) {\n resolve(value);\n });\n };\n /** JSDoc */\n SyncPromise.reject = function (reason) {\n return new SyncPromise(function (_, reject) {\n reject(reason);\n });\n };\n /** JSDoc */\n SyncPromise.all = function (collection) {\n return new SyncPromise(function (resolve, reject) {\n if (!Array.isArray(collection)) {\n reject(new TypeError(\"Promise.all requires an array as input.\"));\n return;\n }\n if (collection.length === 0) {\n resolve([]);\n return;\n }\n var counter = collection.length;\n var resolvedCollection = [];\n collection.forEach(function (item, index) {\n void SyncPromise.resolve(item)\n .then(function (value) {\n resolvedCollection[index] = value;\n counter -= 1;\n if (counter !== 0) {\n return;\n }\n resolve(resolvedCollection);\n })\n .then(null, reject);\n });\n });\n };\n /** JSDoc */\n SyncPromise.prototype.then = function (onfulfilled, onrejected) {\n var _this = this;\n return new SyncPromise(function (resolve, reject) {\n _this._attachHandler({\n done: false,\n onfulfilled: function (result) {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result);\n return;\n }\n try {\n resolve(onfulfilled(result));\n return;\n }\n catch (e) {\n reject(e);\n return;\n }\n },\n onrejected: function (reason) {\n if (!onrejected) {\n reject(reason);\n return;\n }\n try {\n resolve(onrejected(reason));\n return;\n }\n catch (e) {\n reject(e);\n return;\n }\n },\n });\n });\n };\n /** JSDoc */\n SyncPromise.prototype.catch = function (onrejected) {\n return this.then(function (val) { return val; }, onrejected);\n };\n /** JSDoc */\n SyncPromise.prototype.finally = function (onfinally) {\n var _this = this;\n return new SyncPromise(function (resolve, reject) {\n var val;\n var isRejected;\n return _this.then(function (value) {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n }, function (reason) {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n }).then(function () {\n if (isRejected) {\n reject(val);\n return;\n }\n resolve(val);\n });\n });\n };\n /** JSDoc */\n SyncPromise.prototype.toString = function () {\n return '[object SyncPromise]';\n };\n return SyncPromise;\n}());\nexport { SyncPromise };\n//# sourceMappingURL=syncpromise.js.map","import { init as browserInit, SDK_VERSION } from '@sentry/browser';\n/**\n * Inits the React SDK\n */\nexport function init(options) {\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.react',\n packages: [\n {\n name: 'npm:@sentry/react',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n browserInit(options);\n}\n//# sourceMappingURL=sdk.js.map","import { __assign } from \"tslib\";\nimport { getGlobalObject } from './global';\nimport { snipLine } from './string';\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4() {\n var global = getGlobalObject();\n var crypto = global.crypto || global.msCrypto;\n if (!(crypto === void 0) && crypto.getRandomValues) {\n // Use window.crypto API if available\n var arr = new Uint16Array(8);\n crypto.getRandomValues(arr);\n // set 4 in byte 7\n // eslint-disable-next-line no-bitwise\n arr[3] = (arr[3] & 0xfff) | 0x4000;\n // set 2 most significant bits of byte 9 to '10'\n // eslint-disable-next-line no-bitwise\n arr[4] = (arr[4] & 0x3fff) | 0x8000;\n var pad = function (num) {\n var v = num.toString(16);\n while (v.length < 4) {\n v = \"0\" + v;\n }\n return v;\n };\n return (pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7]));\n }\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n // eslint-disable-next-line no-bitwise\n var r = (Math.random() * 16) | 0;\n // eslint-disable-next-line no-bitwise\n var v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(url) {\n if (!url) {\n return {};\n }\n var match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) {\n return {};\n }\n // coerce to undefined values to empty string so we don't get 'undefined'\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment,\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 */\nexport function getEventDescription(event) {\n if (event.message) {\n return event.message;\n }\n if (event.exception && event.exception.values && event.exception.values[0]) {\n var exception = event.exception.values[0];\n if (exception.type && exception.value) {\n return exception.type + \": \" + exception.value;\n }\n return exception.type || exception.value || event.event_id || '';\n }\n return event.event_id || '';\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 */\nexport function addExceptionTypeValue(event, value, type) {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\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 */\nexport function addExceptionMechanism(event, newMechanism) {\n var _a;\n if (!event.exception || !event.exception.values) {\n return;\n }\n var exceptionValue0 = event.exception.values[0];\n var defaultMechanism = { type: 'generic', handled: true };\n var currentMechanism = exceptionValue0.mechanism;\n exceptionValue0.mechanism = __assign(__assign(__assign({}, defaultMechanism), currentMechanism), newMechanism);\n if (newMechanism && 'data' in newMechanism) {\n var mergedData = __assign(__assign({}, (_a = currentMechanism) === null || _a === void 0 ? void 0 : _a.data), newMechanism.data);\n exceptionValue0.mechanism.data = mergedData;\n }\n}\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nvar SEMVER_REGEXP = /^(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 * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input) {\n var match = input.match(SEMVER_REGEXP) || [];\n var major = parseInt(match[1], 10);\n var minor = parseInt(match[2], 10);\n var 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}\nvar defaultRetryAfter = 60 * 1000; // 60 seconds\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param now current unix timestamp\n * @param header string representation of 'Retry-After' header\n */\nexport function parseRetryAfterHeader(now, header) {\n if (!header) {\n return defaultRetryAfter;\n }\n var headerDelay = parseInt(\"\" + header, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n var headerDate = Date.parse(\"\" + header);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n return defaultRetryAfter;\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 */\nexport function addContextToFrame(lines, frame, linesOfContext) {\n if (linesOfContext === void 0) { linesOfContext = 5; }\n var lineno = frame.lineno || 0;\n var maxLines = lines.length;\n var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map(function (line) { return snipLine(line, 0); });\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map(function (line) { return snipLine(line, 0); });\n}\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nexport function stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\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 */\nexport function checkOrSetAlreadyCaught(exception) {\n var _a;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if ((_a = exception) === null || _a === void 0 ? void 0 : _a.__sentry_captured__) {\n return true;\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 Object.defineProperty(exception, '__sentry_captured__', {\n value: true,\n });\n }\n catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n return false;\n}\n//# sourceMappingURL=misc.js.map","import { __assign, __extends } from \"tslib\";\nimport { getCurrentHub, Hub } from '@sentry/hub';\nimport { Outcome, } from '@sentry/types';\nimport { dropUndefinedKeys, isInstanceOf, logger } from '@sentry/utils';\nimport { Span as SpanClass, SpanRecorder } from './span';\n/** JSDoc */\nvar Transaction = /** @class */ (function (_super) {\n __extends(Transaction, _super);\n /**\n * This constructor should never be called manually. Those instrumenting tracing should use\n * `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`.\n * @internal\n * @hideconstructor\n * @hidden\n */\n function Transaction(transactionContext, hub) {\n var _this = _super.call(this, transactionContext) || this;\n _this._measurements = {};\n /**\n * The reference to the current hub.\n */\n _this._hub = getCurrentHub();\n if (isInstanceOf(hub, Hub)) {\n _this._hub = hub;\n }\n _this.name = transactionContext.name || '';\n _this.metadata = transactionContext.metadata || {};\n _this._trimEnd = transactionContext.trimEnd;\n // this is because transactions are also spans, and spans have a transaction pointer\n _this.transaction = _this;\n return _this;\n }\n /**\n * JSDoc\n */\n Transaction.prototype.setName = function (name) {\n this.name = name;\n };\n /**\n * Attaches SpanRecorder to the span itself\n * @param maxlen maximum number of spans that can be recorded\n */\n Transaction.prototype.initSpanRecorder = function (maxlen) {\n if (maxlen === void 0) { maxlen = 1000; }\n if (!this.spanRecorder) {\n this.spanRecorder = new SpanRecorder(maxlen);\n }\n this.spanRecorder.add(this);\n };\n /**\n * Set observed measurements for this transaction.\n * @hidden\n */\n Transaction.prototype.setMeasurements = function (measurements) {\n this._measurements = __assign({}, measurements);\n };\n /**\n * Set metadata for this transaction.\n * @hidden\n */\n Transaction.prototype.setMetadata = function (newMetadata) {\n this.metadata = __assign(__assign({}, this.metadata), newMetadata);\n };\n /**\n * @inheritDoc\n */\n Transaction.prototype.finish = function (endTimestamp) {\n var _this = this;\n var _a, _b, _c, _d, _e;\n // This transaction is already finished, so we should not flush it again.\n if (this.endTimestamp !== undefined) {\n return undefined;\n }\n if (!this.name) {\n logger.warn('Transaction has no name, falling back to ``.');\n this.name = '';\n }\n // just sets the end timestamp\n _super.prototype.finish.call(this, endTimestamp);\n if (this.sampled !== true) {\n // At this point if `sampled !== true` we want to discard the transaction.\n logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');\n (_e = (_c = (_a = this._hub\n .getClient()) === null || _a === void 0 ? void 0 : (_b = _a).getTransport) === null || _c === void 0 ? void 0 : (_d = _c.call(_b)).recordLostEvent) === null || _e === void 0 ? void 0 : _e.call(_d, Outcome.SampleRate, 'transaction');\n return undefined;\n }\n var finishedSpans = this.spanRecorder ? this.spanRecorder.spans.filter(function (s) { return s !== _this && s.endTimestamp; }) : [];\n if (this._trimEnd && finishedSpans.length > 0) {\n this.endTimestamp = finishedSpans.reduce(function (prev, current) {\n if (prev.endTimestamp && current.endTimestamp) {\n return prev.endTimestamp > current.endTimestamp ? prev : current;\n }\n return prev;\n }).endTimestamp;\n }\n var transaction = {\n contexts: {\n trace: this.getTraceContext(),\n },\n spans: finishedSpans,\n start_timestamp: this.startTimestamp,\n tags: this.tags,\n timestamp: this.endTimestamp,\n transaction: this.name,\n type: 'transaction',\n debug_meta: this.metadata,\n };\n var hasMeasurements = Object.keys(this._measurements).length > 0;\n if (hasMeasurements) {\n logger.log('[Measurements] Adding measurements to transaction', JSON.stringify(this._measurements, undefined, 2));\n transaction.measurements = this._measurements;\n }\n logger.log(\"[Tracing] Finishing \" + this.op + \" transaction: \" + this.name + \".\");\n return this._hub.captureEvent(transaction);\n };\n /**\n * @inheritDoc\n */\n Transaction.prototype.toContext = function () {\n var spanContext = _super.prototype.toContext.call(this);\n return dropUndefinedKeys(__assign(__assign({}, spanContext), { name: this.name, trimEnd: this._trimEnd }));\n };\n /**\n * @inheritDoc\n */\n Transaction.prototype.updateWithContext = function (transactionContext) {\n var _a;\n _super.prototype.updateWithContext.call(this, transactionContext);\n this.name = (_a = transactionContext.name, (_a !== null && _a !== void 0 ? _a : ''));\n this._trimEnd = transactionContext.trimEnd;\n return this;\n };\n return Transaction;\n}(SpanClass));\nexport { Transaction };\n//# sourceMappingURL=transaction.js.map","import { __assign } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport { getCurrentHub } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { addExceptionMechanism, addInstrumentationHandler, getLocationHref, isErrorEvent, isPrimitive, isString, logger, } from '@sentry/utils';\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n/** Global handlers */\nvar GlobalHandlers = /** @class */ (function () {\n /** JSDoc */\n function GlobalHandlers(options) {\n /**\n * @inheritDoc\n */\n this.name = GlobalHandlers.id;\n /** JSDoc */\n this._onErrorHandlerInstalled = false;\n /** JSDoc */\n this._onUnhandledRejectionHandlerInstalled = false;\n this._options = __assign({ onerror: true, onunhandledrejection: true }, options);\n }\n /**\n * @inheritDoc\n */\n GlobalHandlers.prototype.setupOnce = function () {\n Error.stackTraceLimit = 50;\n if (this._options.onerror) {\n logger.log('Global Handler attached: onerror');\n this._installGlobalOnErrorHandler();\n }\n if (this._options.onunhandledrejection) {\n logger.log('Global Handler attached: onunhandledrejection');\n this._installGlobalOnUnhandledRejectionHandler();\n }\n };\n /** JSDoc */\n GlobalHandlers.prototype._installGlobalOnErrorHandler = function () {\n var _this = this;\n if (this._onErrorHandlerInstalled) {\n return;\n }\n addInstrumentationHandler({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callback: function (data) {\n var error = data.error;\n var currentHub = getCurrentHub();\n var hasIntegration = currentHub.getIntegration(GlobalHandlers);\n var isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return;\n }\n var client = currentHub.getClient();\n var event = error === undefined && isString(data.msg)\n ? _this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column)\n : _this._enhanceEventWithInitialFrame(eventFromUnknownInput(error || data.msg, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: false,\n }), data.url, data.line, data.column);\n addExceptionMechanism(event, {\n handled: false,\n type: 'onerror',\n });\n currentHub.captureEvent(event, {\n originalException: error,\n });\n },\n type: 'error',\n });\n this._onErrorHandlerInstalled = true;\n };\n /** JSDoc */\n GlobalHandlers.prototype._installGlobalOnUnhandledRejectionHandler = function () {\n var _this = this;\n if (this._onUnhandledRejectionHandlerInstalled) {\n return;\n }\n addInstrumentationHandler({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callback: function (e) {\n var error = e;\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n }\n catch (_oO) {\n // no-empty\n }\n var currentHub = getCurrentHub();\n var hasIntegration = currentHub.getIntegration(GlobalHandlers);\n var isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return true;\n }\n var client = currentHub.getClient();\n var event = isPrimitive(error)\n ? _this._eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: true,\n });\n event.level = Severity.Error;\n addExceptionMechanism(event, {\n handled: false,\n type: 'onunhandledrejection',\n });\n currentHub.captureEvent(event, {\n originalException: error,\n });\n return;\n },\n type: 'unhandledrejection',\n });\n this._onUnhandledRejectionHandlerInstalled = true;\n };\n /**\n * This function creates a stack from an old, error-less onerror handler.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n GlobalHandlers.prototype._eventFromIncompleteOnError = function (msg, url, line, column) {\n var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n // If 'message' is ErrorEvent, get real message from inside\n var message = isErrorEvent(msg) ? msg.message : msg;\n var name;\n var groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n var event = {\n exception: {\n values: [\n {\n type: name || 'Error',\n value: message,\n },\n ],\n },\n };\n return this._enhanceEventWithInitialFrame(event, url, line, column);\n };\n /**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\n GlobalHandlers.prototype._eventFromRejectionWithPrimitive = function (reason) {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: \"Non-Error promise rejection captured with value: \" + String(reason),\n },\n ],\n },\n };\n };\n /** JSDoc */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n GlobalHandlers.prototype._enhanceEventWithInitialFrame = function (event, url, line, column) {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {};\n event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || [];\n var colno = isNaN(parseInt(column, 10)) ? undefined : column;\n var lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n var filename = isString(url) && url.length > 0 ? url : getLocationHref();\n if (event.exception.values[0].stacktrace.frames.length === 0) {\n event.exception.values[0].stacktrace.frames.push({\n colno: colno,\n filename: filename,\n function: '?',\n in_app: true,\n lineno: lineno,\n });\n }\n return event;\n };\n /**\n * @inheritDoc\n */\n GlobalHandlers.id = 'GlobalHandlers';\n return GlobalHandlers;\n}());\nexport { GlobalHandlers };\n//# sourceMappingURL=globalhandlers.js.map","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { logger } from '@sentry/utils';\nexport var installedIntegrations = [];\n/**\n * @private\n */\nfunction filterDuplicates(integrations) {\n return integrations.reduce(function (acc, integrations) {\n if (acc.every(function (accIntegration) { return integrations.name !== accIntegration.name; })) {\n acc.push(integrations);\n }\n return acc;\n }, []);\n}\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options) {\n var defaultIntegrations = (options.defaultIntegrations && __spread(options.defaultIntegrations)) || [];\n var userIntegrations = options.integrations;\n var integrations = __spread(filterDuplicates(defaultIntegrations));\n if (Array.isArray(userIntegrations)) {\n // Filter out integrations that are also included in user options\n integrations = __spread(integrations.filter(function (integrations) {\n return userIntegrations.every(function (userIntegration) { return userIntegration.name !== integrations.name; });\n }), filterDuplicates(userIntegrations));\n }\n else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(integrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n // Make sure that if present, `Debug` integration will always run last\n var integrationsNames = integrations.map(function (i) { return i.name; });\n var alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push.apply(integrations, __spread(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));\n }\n return integrations;\n}\n/** Setup given integration */\nexport function setupIntegration(integration) {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n logger.log(\"Integration installed: \" + integration.name);\n}\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(options) {\n var integrations = {};\n getIntegrationsToSetup(options).forEach(function (integration) {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n // set the `initialized` flag so we don't run through the process again unecessarily; use `Object.defineProperty`\n // because by default it creates a property which is nonenumerable, which we want since `initialized` shouldn't be\n // considered a member of the index the way the actual integrations are\n Object.defineProperty(integrations, 'initialized', { value: true });\n return integrations;\n}\n//# sourceMappingURL=integration.js.map","import { __assign, __read, __spread, __values } from \"tslib\";\n/* eslint-disable max-lines */\nimport { Scope } from '@sentry/hub';\nimport { Outcome, SessionStatus, } from '@sentry/types';\nimport { checkOrSetAlreadyCaught, dateTimestampInSeconds, Dsn, isPlainObject, isPrimitive, isThenable, logger, normalize, SentryError, SyncPromise, truncate, uuid4, } from '@sentry/utils';\nimport { setupIntegrations } from './integration';\nvar ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\nvar BaseClient = /** @class */ (function () {\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n function BaseClient(backendClass, options) {\n /** Array of used integrations. */\n this._integrations = {};\n /** Number of calls being processed */\n this._numProcessing = 0;\n this._backend = new backendClass(options);\n this._options = options;\n if (options.dsn) {\n this._dsn = new Dsn(options.dsn);\n }\n }\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n BaseClient.prototype.captureException = function (exception, hint, scope) {\n var _this = this;\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n var eventId = hint && hint.event_id;\n this._process(this._getBackend()\n .eventFromException(exception, hint)\n .then(function (event) { return _this._captureEvent(event, hint, scope); })\n .then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureMessage = function (message, level, hint, scope) {\n var _this = this;\n var eventId = hint && hint.event_id;\n var promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(String(message), level, hint)\n : this._getBackend().eventFromException(message, hint);\n this._process(promisedEvent\n .then(function (event) { return _this._captureEvent(event, hint, scope); })\n .then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureEvent = function (event, hint, scope) {\n var _a;\n // ensure we haven't captured this very object before\n if (((_a = hint) === null || _a === void 0 ? void 0 : _a.originalException) && checkOrSetAlreadyCaught(hint.originalException)) {\n logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n var eventId = hint && hint.event_id;\n this._process(this._captureEvent(event, hint, scope).then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureSession = function (session) {\n if (!this._isEnabled()) {\n logger.warn('SDK not enabled, will not capture session.');\n return;\n }\n if (!(typeof session.release === 'string')) {\n logger.warn('Discarded session because of missing or non-string release');\n }\n else {\n this._sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n session.update({ init: false });\n }\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getDsn = function () {\n return this._dsn;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getOptions = function () {\n return this._options;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getTransport = function () {\n return this._getBackend().getTransport();\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.flush = function (timeout) {\n var _this = this;\n return this._isClientDoneProcessing(timeout).then(function (clientFinished) {\n return _this.getTransport()\n .close(timeout)\n .then(function (transportFlushed) { return clientFinished && transportFlushed; });\n });\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.close = function (timeout) {\n var _this = this;\n return this.flush(timeout).then(function (result) {\n _this.getOptions().enabled = false;\n return result;\n });\n };\n /**\n * Sets up the integrations\n */\n BaseClient.prototype.setupIntegrations = function () {\n if (this._isEnabled() && !this._integrations.initialized) {\n this._integrations = setupIntegrations(this._options);\n }\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getIntegration = function (integration) {\n try {\n return this._integrations[integration.id] || null;\n }\n catch (_oO) {\n logger.warn(\"Cannot retrieve integration \" + integration.id + \" from the current Client\");\n return null;\n }\n };\n /** Updates existing session based on the provided event */\n BaseClient.prototype._updateSessionFromEvent = function (session, event) {\n var e_1, _a;\n var crashed = false;\n var errored = false;\n var exceptions = event.exception && event.exception.values;\n if (exceptions) {\n errored = true;\n try {\n for (var exceptions_1 = __values(exceptions), exceptions_1_1 = exceptions_1.next(); !exceptions_1_1.done; exceptions_1_1 = exceptions_1.next()) {\n var ex = exceptions_1_1.value;\n var mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (exceptions_1_1 && !exceptions_1_1.done && (_a = exceptions_1.return)) _a.call(exceptions_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n var sessionNonTerminal = session.status === SessionStatus.Ok;\n var shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n if (shouldUpdateAndSend) {\n session.update(__assign(__assign({}, (crashed && { status: SessionStatus.Crashed })), { errors: session.errors || Number(errored || crashed) }));\n this.captureSession(session);\n }\n };\n /** Deliver captured session to Sentry */\n BaseClient.prototype._sendSession = function (session) {\n this._getBackend().sendSession(session);\n };\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n BaseClient.prototype._isClientDoneProcessing = function (timeout) {\n var _this = this;\n return new SyncPromise(function (resolve) {\n var ticked = 0;\n var tick = 1;\n var interval = setInterval(function () {\n if (_this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n }\n else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n };\n /** Returns the current backend. */\n BaseClient.prototype._getBackend = function () {\n return this._backend;\n };\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n BaseClient.prototype._isEnabled = function () {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n };\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n BaseClient.prototype._prepareEvent = function (event, scope, hint) {\n var _this = this;\n var _a = this.getOptions().normalizeDepth, normalizeDepth = _a === void 0 ? 3 : _a;\n var prepared = __assign(__assign({}, event), { event_id: event.event_id || (hint && hint.event_id ? hint.event_id : uuid4()), timestamp: event.timestamp || dateTimestampInSeconds() });\n this._applyClientOptions(prepared);\n this._applyIntegrationsMetadata(prepared);\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n var finalScope = scope;\n if (hint && hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n }\n // We prepare the result here with a resolved Event.\n var result = SyncPromise.resolve(prepared);\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n if (finalScope) {\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint);\n }\n return result.then(function (evt) {\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return _this._normalizeEvent(evt, normalizeDepth);\n }\n return evt;\n });\n };\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n BaseClient.prototype._normalizeEvent = function (event, depth) {\n if (!event) {\n return null;\n }\n var normalized = __assign(__assign(__assign(__assign(__assign({}, event), (event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(function (b) { return (__assign(__assign({}, b), (b.data && {\n data: normalize(b.data, depth),\n }))); }),\n })), (event.user && {\n user: normalize(event.user, depth),\n })), (event.contexts && {\n contexts: normalize(event.contexts, depth),\n })), (event.extra && {\n extra: normalize(event.extra, depth),\n }));\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n normalized.contexts.trace = event.contexts.trace;\n }\n var _a = this.getOptions()._experiments, _experiments = _a === void 0 ? {} : _a;\n if (_experiments.ensureNoCircularStructures) {\n return normalize(normalized);\n }\n return normalized;\n };\n /**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\n BaseClient.prototype._applyClientOptions = function (event) {\n var options = this.getOptions();\n var environment = options.environment, release = options.release, dist = options.dist, _a = options.maxValueLength, maxValueLength = _a === void 0 ? 250 : _a;\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : 'production';\n }\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n var exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n var request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n };\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\n BaseClient.prototype._applyIntegrationsMetadata = function (event) {\n var integrationsArray = Object.keys(this._integrations);\n if (integrationsArray.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = __spread((event.sdk.integrations || []), integrationsArray);\n }\n };\n /**\n * Tells the backend to send this event\n * @param event The Sentry event to send\n */\n BaseClient.prototype._sendEvent = function (event) {\n this._getBackend().sendEvent(event);\n };\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n BaseClient.prototype._captureEvent = function (event, hint, scope) {\n return this._processEvent(event, hint, scope).then(function (finalEvent) {\n return finalEvent.event_id;\n }, function (reason) {\n logger.error(reason);\n return undefined;\n });\n };\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n BaseClient.prototype._processEvent = function (event, hint, scope) {\n var _this = this;\n var _a, _b;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _c = this.getOptions(), beforeSend = _c.beforeSend, sampleRate = _c.sampleRate;\n var transport = this.getTransport();\n if (!this._isEnabled()) {\n return SyncPromise.reject(new SentryError('SDK not enabled, will not capture event.'));\n }\n var isTransaction = event.type === 'transaction';\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n (_b = (_a = transport).recordLostEvent) === null || _b === void 0 ? void 0 : _b.call(_a, Outcome.SampleRate, 'event');\n return SyncPromise.reject(new SentryError(\"Discarding event because it's not included in the random sample (sampling rate = \" + sampleRate + \")\"));\n }\n return this._prepareEvent(event, scope, hint)\n .then(function (prepared) {\n var _a, _b;\n if (prepared === null) {\n (_b = (_a = transport).recordLostEvent) === null || _b === void 0 ? void 0 : _b.call(_a, Outcome.EventProcessor, event.type || 'event');\n throw new SentryError('An event processor returned null, will not send event.');\n }\n var isInternalException = hint && hint.data && hint.data.__sentry__ === true;\n if (isInternalException || isTransaction || !beforeSend) {\n return prepared;\n }\n var beforeSendResult = beforeSend(prepared, hint);\n return _this._ensureBeforeSendRv(beforeSendResult);\n })\n .then(function (processedEvent) {\n var _a, _b;\n if (processedEvent === null) {\n (_b = (_a = transport).recordLostEvent) === null || _b === void 0 ? void 0 : _b.call(_a, Outcome.BeforeSend, event.type || 'event');\n throw new SentryError('`beforeSend` returned `null`, will not send event.');\n }\n var session = scope && scope.getSession && scope.getSession();\n if (!isTransaction && session) {\n _this._updateSessionFromEvent(session, processedEvent);\n }\n _this._sendEvent(processedEvent);\n return processedEvent;\n })\n .then(null, function (reason) {\n if (reason instanceof SentryError) {\n throw reason;\n }\n _this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new SentryError(\"Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: \" + reason);\n });\n };\n /**\n * Occupies the client with processing and event\n */\n BaseClient.prototype._process = function (promise) {\n var _this = this;\n this._numProcessing += 1;\n void promise.then(function (value) {\n _this._numProcessing -= 1;\n return value;\n }, function (reason) {\n _this._numProcessing -= 1;\n return reason;\n });\n };\n /**\n * Verifies that return value of configured `beforeSend` is of expected type.\n */\n BaseClient.prototype._ensureBeforeSendRv = function (rv) {\n var nullErr = '`beforeSend` method has to return `null` or a valid event.';\n if (isThenable(rv)) {\n return rv.then(function (event) {\n if (!(isPlainObject(event) || event === null)) {\n throw new SentryError(nullErr);\n }\n return event;\n }, function (e) {\n throw new SentryError(\"beforeSend rejected with \" + e);\n });\n }\n else if (!(isPlainObject(rv) || rv === null)) {\n throw new SentryError(nullErr);\n }\n return rv;\n };\n return BaseClient;\n}());\nexport { BaseClient };\n//# sourceMappingURL=baseclient.js.map","// Store finish reasons in tuple to save on bundle size\n// Readonly type should enforce that this is not mutated.\nexport var FINISH_REASON_TAG = 'finishReason';\nexport var IDLE_TRANSACTION_FINISH_REASONS = ['heartbeatFailed', 'idleTimeout', 'documentHidden'];\n//# sourceMappingURL=constants.js.map","import { getGlobalObject } from './global';\n// TODO: Implement different loggers for different environments\nvar global = getGlobalObject();\n/** Prefix for logging strings */\nvar PREFIX = 'Sentry Logger ';\n/**\n * Temporarily unwrap `console.log` and friends in order to perform the given callback using the original methods.\n * Restores wrapping after the callback completes.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nexport function consoleSandbox(callback) {\n var global = getGlobalObject();\n var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];\n if (!('console' in global)) {\n return callback();\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var originalConsole = global.console;\n var wrappedLevels = {};\n // Restore all wrapped console methods\n levels.forEach(function (level) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (level in global.console && originalConsole[level].__sentry_original__) {\n wrappedLevels[level] = originalConsole[level];\n originalConsole[level] = originalConsole[level].__sentry_original__;\n }\n });\n // Perform callback manipulations\n var result = callback();\n // Revert restoration to wrapped state\n Object.keys(wrappedLevels).forEach(function (level) {\n originalConsole[level] = wrappedLevels[level];\n });\n return result;\n}\n/** JSDoc */\nvar Logger = /** @class */ (function () {\n /** JSDoc */\n function Logger() {\n this._enabled = false;\n }\n /** JSDoc */\n Logger.prototype.disable = function () {\n this._enabled = false;\n };\n /** JSDoc */\n Logger.prototype.enable = function () {\n this._enabled = true;\n };\n /** JSDoc */\n Logger.prototype.log = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this._enabled) {\n return;\n }\n consoleSandbox(function () {\n global.console.log(PREFIX + \"[Log]: \" + args.join(' '));\n });\n };\n /** JSDoc */\n Logger.prototype.warn = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this._enabled) {\n return;\n }\n consoleSandbox(function () {\n global.console.warn(PREFIX + \"[Warn]: \" + args.join(' '));\n });\n };\n /** JSDoc */\n Logger.prototype.error = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this._enabled) {\n return;\n }\n consoleSandbox(function () {\n global.console.error(PREFIX + \"[Error]: \" + args.join(' '));\n });\n };\n return Logger;\n}());\n// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\nglobal.__SENTRY__ = global.__SENTRY__ || {};\nvar logger = global.__SENTRY__.logger || (global.__SENTRY__.logger = new Logger());\nexport { logger };\n//# sourceMappingURL=logger.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { getMainCarrier } from '@sentry/hub';\nimport { TransactionSamplingMethod, } from '@sentry/types';\nimport { dynamicRequire, isNodeEnv, loadModule, logger } from '@sentry/utils';\nimport { registerErrorInstrumentation } from './errors';\nimport { IdleTransaction } from './idletransaction';\nimport { Transaction } from './transaction';\nimport { hasTracingEnabled } from './utils';\n/** Returns all trace headers that are currently on the top scope. */\nfunction traceHeaders() {\n var scope = this.getScope();\n if (scope) {\n var span = scope.getSpan();\n if (span) {\n return {\n 'sentry-trace': span.toTraceparent(),\n };\n }\n }\n return {};\n}\n/**\n * Makes a sampling decision for the given transaction and stores it on the transaction.\n *\n * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n *\n * @param hub: The hub off of which to read config options\n * @param transaction: The transaction needing a sampling decision\n * @param samplingContext: Default and user-provided data which may be used to help make the decision\n *\n * @returns The given transaction with its `sampled` value set\n */\nfunction sample(transaction, options, samplingContext) {\n // nothing to do if tracing is not enabled\n if (!hasTracingEnabled(options)) {\n transaction.sampled = false;\n return transaction;\n }\n // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that\n if (transaction.sampled !== undefined) {\n transaction.setMetadata({\n transactionSampling: { method: TransactionSamplingMethod.Explicit },\n });\n return transaction;\n }\n // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` were defined, so one of these should\n // work; prefer the hook if so\n var sampleRate;\n if (typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler(samplingContext);\n transaction.setMetadata({\n transactionSampling: {\n method: TransactionSamplingMethod.Sampler,\n // cast to number in case it's a boolean\n rate: Number(sampleRate),\n },\n });\n }\n else if (samplingContext.parentSampled !== undefined) {\n sampleRate = samplingContext.parentSampled;\n transaction.setMetadata({\n transactionSampling: { method: TransactionSamplingMethod.Inheritance },\n });\n }\n else {\n sampleRate = options.tracesSampleRate;\n transaction.setMetadata({\n transactionSampling: {\n method: TransactionSamplingMethod.Rate,\n // cast to number in case it's a boolean\n rate: Number(sampleRate),\n },\n });\n }\n // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The\n // only valid values are booleans or numbers between 0 and 1.)\n if (!isValidSampleRate(sampleRate)) {\n logger.warn(\"[Tracing] Discarding transaction because of invalid sample rate.\");\n transaction.sampled = false;\n return transaction;\n }\n // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n if (!sampleRate) {\n logger.log(\"[Tracing] Discarding transaction because \" + (typeof options.tracesSampler === 'function'\n ? 'tracesSampler returned 0 or false'\n : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'));\n transaction.sampled = false;\n return transaction;\n }\n // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n transaction.sampled = Math.random() < sampleRate;\n // if we're not going to keep it, we're done\n if (!transaction.sampled) {\n logger.log(\"[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = \" + Number(sampleRate) + \")\");\n return transaction;\n }\n logger.log(\"[Tracing] starting \" + transaction.op + \" transaction - \" + transaction.name);\n return transaction;\n}\n/**\n * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).\n */\nfunction isValidSampleRate(rate) {\n // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {\n logger.warn(\"[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got \" + JSON.stringify(rate) + \" of type \" + JSON.stringify(typeof rate) + \".\");\n return false;\n }\n // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false\n if (rate < 0 || rate > 1) {\n logger.warn(\"[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got \" + rate + \".\");\n return false;\n }\n return true;\n}\n/**\n * Creates a new transaction and adds a sampling decision if it doesn't yet have one.\n *\n * The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if\n * it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an\n * \"extension method.\"\n *\n * @param this: The Hub starting the transaction\n * @param transactionContext: Data used to configure the transaction\n * @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any)\n *\n * @returns The new transaction\n *\n * @see {@link Hub.startTransaction}\n */\nfunction _startTransaction(transactionContext, customSamplingContext) {\n var _a, _b;\n var options = ((_a = this.getClient()) === null || _a === void 0 ? void 0 : _a.getOptions()) || {};\n var transaction = new Transaction(transactionContext, this);\n transaction = sample(transaction, options, __assign({ parentSampled: transactionContext.parentSampled, transactionContext: transactionContext }, customSamplingContext));\n if (transaction.sampled) {\n transaction.initSpanRecorder((_b = options._experiments) === null || _b === void 0 ? void 0 : _b.maxSpans);\n }\n return transaction;\n}\n/**\n * Create new idle transaction.\n */\nexport function startIdleTransaction(hub, transactionContext, idleTimeout, onScope, customSamplingContext) {\n var _a, _b;\n var options = ((_a = hub.getClient()) === null || _a === void 0 ? void 0 : _a.getOptions()) || {};\n var transaction = new IdleTransaction(transactionContext, hub, idleTimeout, onScope);\n transaction = sample(transaction, options, __assign({ parentSampled: transactionContext.parentSampled, transactionContext: transactionContext }, customSamplingContext));\n if (transaction.sampled) {\n transaction.initSpanRecorder((_b = options._experiments) === null || _b === void 0 ? void 0 : _b.maxSpans);\n }\n return transaction;\n}\n/**\n * @private\n */\nexport function _addTracingExtensions() {\n var carrier = getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n if (!carrier.__SENTRY__.extensions.startTransaction) {\n carrier.__SENTRY__.extensions.startTransaction = _startTransaction;\n }\n if (!carrier.__SENTRY__.extensions.traceHeaders) {\n carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;\n }\n}\n/**\n * @private\n */\nfunction _autoloadDatabaseIntegrations() {\n var carrier = getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n var packageToIntegrationMapping = {\n mongodb: function () {\n var integration = dynamicRequire(module, './integrations/node/mongo');\n return new integration.Mongo();\n },\n mongoose: function () {\n var integration = dynamicRequire(module, './integrations/node/mongo');\n return new integration.Mongo({ mongoose: true });\n },\n mysql: function () {\n var integration = dynamicRequire(module, './integrations/node/mysql');\n return new integration.Mysql();\n },\n pg: function () {\n var integration = dynamicRequire(module, './integrations/node/postgres');\n return new integration.Postgres();\n },\n };\n var mappedPackages = Object.keys(packageToIntegrationMapping)\n .filter(function (moduleName) { return !!loadModule(moduleName); })\n .map(function (pkg) {\n try {\n return packageToIntegrationMapping[pkg]();\n }\n catch (e) {\n return undefined;\n }\n })\n .filter(function (p) { return p; });\n if (mappedPackages.length > 0) {\n carrier.__SENTRY__.integrations = __spread((carrier.__SENTRY__.integrations || []), mappedPackages);\n }\n}\n/**\n * This patches the global object and injects the Tracing extensions methods\n */\nexport function addExtensionMethods() {\n _addTracingExtensions();\n // Detect and automatically load specified integrations.\n if (isNodeEnv()) {\n _autoloadDatabaseIntegrations();\n }\n // If an error happens globally, we should make sure transaction status is set to error.\n registerErrorInstrumentation();\n}\n//# sourceMappingURL=hubextensions.js.map","import { __extends } from \"tslib\";\nimport { eventToSentryRequest, sessionToSentryRequest } from '@sentry/core';\nimport { Outcome } from '@sentry/types';\nimport { SentryError, SyncPromise } from '@sentry/utils';\nimport { BaseTransport } from './base';\n/** `XHR` based transport */\nvar XHRTransport = /** @class */ (function (_super) {\n __extends(XHRTransport, _super);\n function XHRTransport() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n XHRTransport.prototype.sendEvent = function (event) {\n return this._sendRequest(eventToSentryRequest(event, this._api), event);\n };\n /**\n * @inheritDoc\n */\n XHRTransport.prototype.sendSession = function (session) {\n return this._sendRequest(sessionToSentryRequest(session, this._api), session);\n };\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n XHRTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {\n var _this = this;\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent(Outcome.RateLimitBackoff, sentryRequest.type);\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n reason: \"Transport for \" + sentryRequest.type + \" requests locked till \" + this._disabledUntil(sentryRequest.type) + \" due to too many requests.\",\n status: 429,\n });\n }\n return this._buffer\n .add(function () {\n return new SyncPromise(function (resolve, reject) {\n var request = new XMLHttpRequest();\n request.onreadystatechange = function () {\n if (request.readyState === 4) {\n var headers = {\n 'x-sentry-rate-limits': request.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': request.getResponseHeader('Retry-After'),\n };\n _this._handleResponse({ requestType: sentryRequest.type, response: request, headers: headers, resolve: resolve, reject: reject });\n }\n };\n request.open('POST', sentryRequest.url);\n for (var header in _this.options.headers) {\n if (Object.prototype.hasOwnProperty.call(_this.options.headers, header)) {\n request.setRequestHeader(header, _this.options.headers[header]);\n }\n }\n request.send(sentryRequest.body);\n });\n })\n .then(undefined, function (reason) {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n _this.recordLostEvent(Outcome.QueueOverflow, sentryRequest.type);\n }\n else {\n _this.recordLostEvent(Outcome.NetworkError, sentryRequest.type);\n }\n throw reason;\n });\n };\n return XHRTransport;\n}(BaseTransport));\nexport { XHRTransport };\n//# sourceMappingURL=xhr.js.map","import { __extends } from \"tslib\";\nimport { eventToSentryRequest, sessionToSentryRequest } from '@sentry/core';\nimport { Outcome } from '@sentry/types';\nimport { SentryError, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\nimport { BaseTransport } from './base';\nimport { getNativeFetchImplementation } from './utils';\n/** `fetch` based transport */\nvar FetchTransport = /** @class */ (function (_super) {\n __extends(FetchTransport, _super);\n function FetchTransport(options, fetchImpl) {\n if (fetchImpl === void 0) { fetchImpl = getNativeFetchImplementation(); }\n var _this = _super.call(this, options) || this;\n _this._fetch = fetchImpl;\n return _this;\n }\n /**\n * @inheritDoc\n */\n FetchTransport.prototype.sendEvent = function (event) {\n return this._sendRequest(eventToSentryRequest(event, this._api), event);\n };\n /**\n * @inheritDoc\n */\n FetchTransport.prototype.sendSession = function (session) {\n return this._sendRequest(sessionToSentryRequest(session, this._api), session);\n };\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n FetchTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {\n var _this = this;\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent(Outcome.RateLimitBackoff, sentryRequest.type);\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n reason: \"Transport for \" + sentryRequest.type + \" requests locked till \" + this._disabledUntil(sentryRequest.type) + \" due to too many requests.\",\n status: 429,\n });\n }\n var options = {\n body: sentryRequest.body,\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: (supportsReferrerPolicy() ? 'origin' : ''),\n };\n if (this.options.fetchParameters !== undefined) {\n Object.assign(options, this.options.fetchParameters);\n }\n if (this.options.headers !== undefined) {\n options.headers = this.options.headers;\n }\n return this._buffer\n .add(function () {\n return new SyncPromise(function (resolve, reject) {\n void _this._fetch(sentryRequest.url, options)\n .then(function (response) {\n var headers = {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n };\n _this._handleResponse({\n requestType: sentryRequest.type,\n response: response,\n headers: headers,\n resolve: resolve,\n reject: reject,\n });\n })\n .catch(reject);\n });\n })\n .then(undefined, function (reason) {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n _this.recordLostEvent(Outcome.QueueOverflow, sentryRequest.type);\n }\n else {\n _this.recordLostEvent(Outcome.NetworkError, sentryRequest.type);\n }\n throw reason;\n });\n };\n return FetchTransport;\n}(BaseTransport));\nexport { FetchTransport };\n//# sourceMappingURL=fetch.js.map","export var Outcome;\n(function (Outcome) {\n Outcome[\"BeforeSend\"] = \"before_send\";\n Outcome[\"EventProcessor\"] = \"event_processor\";\n Outcome[\"NetworkError\"] = \"network_error\";\n Outcome[\"QueueOverflow\"] = \"queue_overflow\";\n Outcome[\"RateLimitBackoff\"] = \"ratelimit_backoff\";\n Outcome[\"SampleRate\"] = \"sample_rate\";\n})(Outcome || (Outcome = {}));\n//# sourceMappingURL=transport.js.map","import { __assign, __read, __rest, __spread } from \"tslib\";\n/** Extract sdk info from from the API metadata */\nfunction getSdkMetadataForEnvelopeHeader(api) {\n if (!api.metadata || !api.metadata.sdk) {\n return;\n }\n var _a = api.metadata.sdk, name = _a.name, version = _a.version;\n return { name: name, version: version };\n}\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event, sdkInfo) {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = __spread((event.sdk.integrations || []), (sdkInfo.integrations || []));\n event.sdk.packages = __spread((event.sdk.packages || []), (sdkInfo.packages || []));\n return event;\n}\n/** Creates a SentryRequest from a Session. */\nexport function sessionToSentryRequest(session, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var envelopeHeaders = JSON.stringify(__assign(__assign({ sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (api.forceEnvelope() && { dsn: api.getDsn().toString() })));\n // I know this is hacky but we don't want to add `session` to request type since it's never rate limited\n var type = 'aggregates' in session ? 'sessions' : 'session';\n var itemHeaders = JSON.stringify({\n type: type,\n });\n return {\n body: envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + JSON.stringify(session),\n type: type,\n url: api.getEnvelopeEndpointWithUrlEncodedAuth(),\n };\n}\n/** Creates a SentryRequest from an event. */\nexport function eventToSentryRequest(event, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var eventType = event.type || 'event';\n var useEnvelope = eventType === 'transaction' || api.forceEnvelope();\n var _a = event.debug_meta || {}, transactionSampling = _a.transactionSampling, metadata = __rest(_a, [\"transactionSampling\"]);\n var _b = transactionSampling || {}, samplingMethod = _b.method, sampleRate = _b.rate;\n if (Object.keys(metadata).length === 0) {\n delete event.debug_meta;\n }\n else {\n event.debug_meta = metadata;\n }\n var req = {\n body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),\n type: eventType,\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n };\n // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n var envelopeHeaders = JSON.stringify(__assign(__assign({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (api.forceEnvelope() && { dsn: api.getDsn().toString() })));\n var itemHeaders = JSON.stringify({\n type: eventType,\n // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and\n // explicitly-set sampling decisions). Are we good with that?\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n var envelope = envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + req.body;\n req.body = envelope;\n }\n return req;\n}\n//# sourceMappingURL=request.js.map","import { __values } from \"tslib\";\nimport { htmlTreeAsString } from './browser';\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive, isSyntheticEvent } from './is';\nimport { Memo } from './memo';\nimport { getFunctionName } from './stacktrace';\nimport { truncate } from './string';\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 */\nexport function fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n var original = source[name];\n var wrapped = replacementFactory(original);\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 wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __sentry_original__: {\n enumerable: false,\n value: original,\n },\n });\n }\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 source[name] = wrapped;\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 */\nexport function urlEncode(object) {\n return Object.keys(object)\n .map(function (key) { return encodeURIComponent(key) + \"=\" + encodeURIComponent(object[key]); })\n .join('&');\n}\n/**\n * Transforms any object into an object literal with all its attributes\n * attached to it.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n */\nfunction getWalkSource(value) {\n if (isError(value)) {\n var error = value;\n var err = {\n message: error.message,\n name: error.name,\n stack: error.stack,\n };\n for (var i in error) {\n if (Object.prototype.hasOwnProperty.call(error, i)) {\n err[i] = error[i];\n }\n }\n return err;\n }\n if (isEvent(value)) {\n var event_1 = value;\n var source = {};\n // Accessing event attributes can throw (see https://github.com/getsentry/sentry-javascript/issues/768 and\n // https://github.com/getsentry/sentry-javascript/issues/838), but accessing `type` hasn't been wrapped in a\n // try-catch in at least two years and no one's complained, so that's likely not an issue anymore\n source.type = event_1.type;\n try {\n source.target = isElement(event_1.target)\n ? htmlTreeAsString(event_1.target)\n : Object.prototype.toString.call(event_1.target);\n }\n catch (_oO) {\n source.target = '';\n }\n try {\n source.currentTarget = isElement(event_1.currentTarget)\n ? htmlTreeAsString(event_1.currentTarget)\n : Object.prototype.toString.call(event_1.currentTarget);\n }\n catch (_oO) {\n source.currentTarget = '';\n }\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n source.detail = event_1.detail;\n }\n for (var attr in event_1) {\n if (Object.prototype.hasOwnProperty.call(event_1, attr)) {\n source[attr] = event_1[attr];\n }\n }\n return source;\n }\n return value;\n}\n/** Calculates bytes size of input string */\nfunction utf8Length(value) {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n/** Calculates bytes size of input object */\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\n/** JSDoc */\nexport function normalizeToSize(object, \n// Default Node.js REPL depth\ndepth, \n// 100kB, as 200kB is max payload size, so half sounds reasonable\nmaxSize) {\n if (depth === void 0) { depth = 3; }\n if (maxSize === void 0) { maxSize = 100 * 1024; }\n var serialized = normalize(object, depth);\n if (jsonSize(serialized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n return serialized;\n}\n/**\n * Transform any non-primitive, BigInt, or Symbol-type value into a string. Acts as a no-op on strings, numbers,\n * booleans, null, and undefined.\n *\n * @param value The value to stringify\n * @returns For non-primitive, BigInt, and Symbol-type values, a string denoting the value's type, type and value, or\n * type and `description` property, respectively. For non-BigInt, non-Symbol primitives, returns the original value,\n * unchanged.\n */\nfunction serializeValue(value) {\n var type = Object.prototype.toString.call(value);\n // Node.js REPL notation\n if (typeof value === 'string') {\n return value;\n }\n if (type === '[object Object]') {\n return '[Object]';\n }\n if (type === '[object Array]') {\n return '[Array]';\n }\n var normalized = normalizeValue(value);\n return isPrimitive(normalized) ? normalized : type;\n}\n/**\n * normalizeValue()\n *\n * Takes unserializable input and make it serializable friendly\n *\n * - translates undefined/NaN values to \"[undefined]\"/\"[NaN]\" respectively,\n * - serializes Error objects\n * - filter global objects\n */\nfunction normalizeValue(value, key) {\n if (key === 'domain' && value && typeof value === 'object' && value._events) {\n return '[Domain]';\n }\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n // It's safe to use `window` and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n if (value === void 0) {\n return '[undefined]';\n }\n if (typeof value === 'function') {\n return \"[Function: \" + getFunctionName(value) + \"]\";\n }\n // symbols and bigints are considered primitives by TS, but aren't natively JSON-serilaizable\n if (typeof value === 'symbol') {\n return \"[\" + String(value) + \"]\";\n }\n if (typeof value === 'bigint') {\n return \"[BigInt: \" + String(value) + \"]\";\n }\n return value;\n}\n/**\n * Walks an object to perform a normalization on it\n *\n * @param key of object that's walked in current iteration\n * @param value object to be walked\n * @param depth Optional number indicating how deep should walking be performed\n * @param memo Optional Memo class handling decycling\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function walk(key, value, depth, memo) {\n if (depth === void 0) { depth = +Infinity; }\n if (memo === void 0) { memo = new Memo(); }\n // If we reach the maximum depth, serialize whatever has left\n if (depth === 0) {\n return serializeValue(value);\n }\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // If value implements `toJSON` method, call it and return early\n if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\n return value.toJSON();\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further\n var normalized = normalizeValue(value, key);\n if (isPrimitive(normalized)) {\n return normalized;\n }\n // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself\n var source = getWalkSource(value);\n // Create an accumulator that will act as a parent for all future itterations of that branch\n var acc = Array.isArray(value) ? [] : {};\n // If we already walked that branch, bail out, as it's circular reference\n if (memo.memoize(value)) {\n return '[Circular ~]';\n }\n // Walk all keys of the source\n for (var innerKey in source) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\n continue;\n }\n // Recursively walk through all the child nodes\n acc[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);\n }\n // Once walked through all the branches, remove the parent from memo storage\n memo.unmemoize(value);\n // Return accumulated values\n return acc;\n}\n/**\n * normalize()\n *\n * - Creates a copy to prevent original input mutation\n * - Skip non-enumerablers\n * - Calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format\n * - Translates known global objects/Classes to a string representations\n * - Takes care of Error objects serialization\n * - Optionally limit depth of final output\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function normalize(input, depth) {\n try {\n return JSON.parse(JSON.stringify(input, function (key, value) { return walk(key, value, depth); }));\n }\n catch (_oO) {\n return '**non-serializable**';\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 */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function extractExceptionKeysForMessage(exception, maxLength) {\n if (maxLength === void 0) { maxLength = 40; }\n var keys = Object.keys(getWalkSource(exception));\n keys.sort();\n if (!keys.length) {\n return '[object has no keys]';\n }\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n var 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 return '';\n}\n/**\n * Given any object, return the new object with removed keys that value was `undefined`.\n * Works recursively on objects and arrays.\n */\nexport function dropUndefinedKeys(val) {\n var e_1, _a;\n if (isPlainObject(val)) {\n var obj = val;\n var rv = {};\n try {\n for (var _b = __values(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n if (typeof obj[key] !== 'undefined') {\n rv[key] = dropUndefinedKeys(obj[key]);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return rv;\n }\n if (Array.isArray(val)) {\n return val.map(dropUndefinedKeys);\n }\n return val;\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 */\nexport function objectify(wat) {\n var objectified;\n switch (true) {\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\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 // 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 // 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//# sourceMappingURL=object.js.map","var originalFunctionToString;\n/** Patch toString calls to return proper name for wrapped functions */\nvar FunctionToString = /** @class */ (function () {\n function FunctionToString() {\n /**\n * @inheritDoc\n */\n this.name = FunctionToString.id;\n }\n /**\n * @inheritDoc\n */\n FunctionToString.prototype.setupOnce = function () {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var context = this.__sentry_original__ || this;\n return originalFunctionToString.apply(context, args);\n };\n };\n /**\n * @inheritDoc\n */\n FunctionToString.id = 'FunctionToString';\n return FunctionToString;\n}());\nexport { FunctionToString };\n//# sourceMappingURL=functiontostring.js.map","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { getEventDescription, isMatchingPattern, logger } from '@sentry/utils';\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nvar DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n/** Inbound filters configurable by the user */\nvar InboundFilters = /** @class */ (function () {\n function InboundFilters(_options) {\n if (_options === void 0) { _options = {}; }\n this._options = _options;\n /**\n * @inheritDoc\n */\n this.name = InboundFilters.id;\n }\n /**\n * @inheritDoc\n */\n InboundFilters.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event) {\n var hub = getCurrentHub();\n if (!hub) {\n return event;\n }\n var self = hub.getIntegration(InboundFilters);\n if (self) {\n var client = hub.getClient();\n var clientOptions = client ? client.getOptions() : {};\n // This checks prevents most of the occurrences of the bug linked below:\n // https://github.com/getsentry/sentry-javascript/issues/2622\n // The bug is caused by multiple SDK instances, where one is minified and one is using non-mangled code.\n // Unfortunatelly we cannot fix it reliably (thus reserved property in rollup's terser config),\n // as we cannot force people using multiple instances in their apps to sync SDK versions.\n var options = typeof self._mergeOptions === 'function' ? self._mergeOptions(clientOptions) : {};\n if (typeof self._shouldDropEvent !== 'function') {\n return event;\n }\n return self._shouldDropEvent(event, options) ? null : event;\n }\n return event;\n });\n };\n /** JSDoc */\n InboundFilters.prototype._shouldDropEvent = function (event, options) {\n if (this._isSentryError(event, options)) {\n logger.warn(\"Event dropped due to being internal Sentry Error.\\nEvent: \" + getEventDescription(event));\n return true;\n }\n if (this._isIgnoredError(event, options)) {\n logger.warn(\"Event dropped due to being matched by `ignoreErrors` option.\\nEvent: \" + getEventDescription(event));\n return true;\n }\n if (this._isDeniedUrl(event, options)) {\n logger.warn(\"Event dropped due to being matched by `denyUrls` option.\\nEvent: \" + getEventDescription(event) + \".\\nUrl: \" + this._getEventFilterUrl(event));\n return true;\n }\n if (!this._isAllowedUrl(event, options)) {\n logger.warn(\"Event dropped due to not being matched by `allowUrls` option.\\nEvent: \" + getEventDescription(event) + \".\\nUrl: \" + this._getEventFilterUrl(event));\n return true;\n }\n return false;\n };\n /** JSDoc */\n InboundFilters.prototype._isSentryError = function (event, options) {\n if (!options.ignoreInternal) {\n return false;\n }\n try {\n return ((event &&\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].type === 'SentryError') ||\n false);\n }\n catch (_oO) {\n return false;\n }\n };\n /** JSDoc */\n InboundFilters.prototype._isIgnoredError = function (event, options) {\n if (!options.ignoreErrors || !options.ignoreErrors.length) {\n return false;\n }\n return this._getPossibleEventMessages(event).some(function (message) {\n // Not sure why TypeScript complains here...\n return options.ignoreErrors.some(function (pattern) { return isMatchingPattern(message, pattern); });\n });\n };\n /** JSDoc */\n InboundFilters.prototype._isDeniedUrl = function (event, options) {\n // TODO: Use Glob instead?\n if (!options.denyUrls || !options.denyUrls.length) {\n return false;\n }\n var url = this._getEventFilterUrl(event);\n return !url ? false : options.denyUrls.some(function (pattern) { return isMatchingPattern(url, pattern); });\n };\n /** JSDoc */\n InboundFilters.prototype._isAllowedUrl = function (event, options) {\n // TODO: Use Glob instead?\n if (!options.allowUrls || !options.allowUrls.length) {\n return true;\n }\n var url = this._getEventFilterUrl(event);\n return !url ? true : options.allowUrls.some(function (pattern) { return isMatchingPattern(url, pattern); });\n };\n /** JSDoc */\n InboundFilters.prototype._mergeOptions = function (clientOptions) {\n if (clientOptions === void 0) { clientOptions = {}; }\n return {\n allowUrls: __spread((this._options.whitelistUrls || []), (this._options.allowUrls || []), (clientOptions.whitelistUrls || []), (clientOptions.allowUrls || [])),\n denyUrls: __spread((this._options.blacklistUrls || []), (this._options.denyUrls || []), (clientOptions.blacklistUrls || []), (clientOptions.denyUrls || [])),\n ignoreErrors: __spread((this._options.ignoreErrors || []), (clientOptions.ignoreErrors || []), DEFAULT_IGNORE_ERRORS),\n ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true,\n };\n };\n /** JSDoc */\n InboundFilters.prototype._getPossibleEventMessages = function (event) {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n var _a = (event.exception.values && event.exception.values[0]) || {}, _b = _a.type, type = _b === void 0 ? '' : _b, _c = _a.value, value = _c === void 0 ? '' : _c;\n return [\"\" + value, type + \": \" + value];\n }\n catch (oO) {\n logger.error(\"Cannot extract message for event \" + getEventDescription(event));\n return [];\n }\n }\n return [];\n };\n /** JSDoc */\n InboundFilters.prototype._getLastValidUrl = function (frames) {\n if (frames === void 0) { frames = []; }\n var _a, _b;\n for (var i = frames.length - 1; i >= 0; i--) {\n var frame = frames[i];\n if (((_a = frame) === null || _a === void 0 ? void 0 : _a.filename) !== '' && ((_b = frame) === null || _b === void 0 ? void 0 : _b.filename) !== '[native code]') {\n return frame.filename || null;\n }\n }\n return null;\n };\n /** JSDoc */\n InboundFilters.prototype._getEventFilterUrl = function (event) {\n try {\n if (event.stacktrace) {\n var frames_1 = event.stacktrace.frames;\n return this._getLastValidUrl(frames_1);\n }\n if (event.exception) {\n var frames_2 = event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;\n return this._getLastValidUrl(frames_2);\n }\n return null;\n }\n catch (oO) {\n logger.error(\"Cannot extract url for event \" + getEventDescription(event));\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n InboundFilters.id = 'InboundFilters';\n return InboundFilters;\n}());\nexport { InboundFilters };\n//# sourceMappingURL=inboundfilters.js.map","import { getCurrentHub } from '@sentry/hub';\nimport { logger } from '@sentry/utils';\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(clientClass, options) {\n var _a;\n if (options.debug === true) {\n logger.enable();\n }\n var hub = getCurrentHub();\n (_a = hub.getScope()) === null || _a === void 0 ? void 0 : _a.update(options.initialScope);\n var client = new clientClass(options);\n hub.bindClient(client);\n}\n//# sourceMappingURL=sdk.js.map","import { __assign } from \"tslib\";\nimport { fill, getFunctionName, getGlobalObject } from '@sentry/utils';\nimport { wrap } from '../helpers';\nvar DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nvar TryCatch = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function TryCatch(options) {\n /**\n * @inheritDoc\n */\n this.name = TryCatch.id;\n this._options = __assign({ XMLHttpRequest: true, eventTarget: true, requestAnimationFrame: true, setInterval: true, setTimeout: true }, options);\n }\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n TryCatch.prototype.setupOnce = function () {\n var global = getGlobalObject();\n if (this._options.setTimeout) {\n fill(global, 'setTimeout', this._wrapTimeFunction.bind(this));\n }\n if (this._options.setInterval) {\n fill(global, 'setInterval', this._wrapTimeFunction.bind(this));\n }\n if (this._options.requestAnimationFrame) {\n fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this));\n }\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this));\n }\n if (this._options.eventTarget) {\n var eventTarget = Array.isArray(this._options.eventTarget) ? this._options.eventTarget : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(this._wrapEventTarget.bind(this));\n }\n };\n /** JSDoc */\n TryCatch.prototype._wrapTimeFunction = function (original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: true,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n };\n /** JSDoc */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n TryCatch.prototype._wrapRAF = function (original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (callback) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.call(this, wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n }));\n };\n };\n /** JSDoc */\n TryCatch.prototype._wrapEventTarget = function (target) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var global = getGlobalObject();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var proto = global[target] && global[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n fill(proto, 'addEventListener', function (original) {\n return function (eventName, fn, options) {\n try {\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target: target,\n },\n handled: true,\n type: 'instrument',\n },\n });\n }\n }\n catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n return original.call(this, eventName, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrap(fn, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target: target,\n },\n handled: true,\n type: 'instrument',\n },\n }), options);\n };\n });\n fill(proto, 'removeEventListener', function (originalRemoveEventListener) {\n return function (eventName, fn, options) {\n var _a;\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n var wrappedEventHandler = fn;\n try {\n var originalEventHandler = (_a = wrappedEventHandler) === null || _a === void 0 ? void 0 : _a.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n }\n catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n });\n };\n /** JSDoc */\n TryCatch.prototype._wrapXHR = function (originalSend) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var xhr = this;\n var xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n xmlHttpRequestProps.forEach(function (prop) {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(xhr, prop, function (original) {\n var wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n };\n // If Instrument integration has been called before TryCatch, get the name of original function\n if (original.__sentry_original__) {\n wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);\n }\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n return originalSend.apply(this, args);\n };\n };\n /**\n * @inheritDoc\n */\n TryCatch.id = 'TryCatch';\n return TryCatch;\n}());\nexport { TryCatch };\n//# sourceMappingURL=trycatch.js.map","import { __assign } from \"tslib\";\nimport { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { addInstrumentationHandler, getGlobalObject, logger, SyncPromise } from '@sentry/utils';\nimport { BrowserClient } from './client';\nimport { wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, Dedupe, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\nexport var defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new Dedupe(),\n new UserAgent(),\n];\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options) {\n if (options === void 0) { options = {}; }\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n var window_1 = getGlobalObject();\n // This supports the variable that sentry-webpack-plugin injects\n if (window_1.SENTRY_RELEASE && window_1.SENTRY_RELEASE.id) {\n options.release = window_1.SENTRY_RELEASE.id;\n }\n }\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = true;\n }\n if (options.sendClientReports === undefined) {\n options.sendClientReports = true;\n }\n initAndBind(BrowserClient, options);\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options) {\n if (options === void 0) { options = {}; }\n var hub = getCurrentHub();\n var scope = hub.getScope();\n if (scope) {\n options.user = __assign(__assign({}, scope.getUser()), options.user);\n }\n if (!options.eventId) {\n options.eventId = hub.lastEventId();\n }\n var client = hub.getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId() {\n return getCurrentHub().lastEventId();\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad() {\n // Noop\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback) {\n callback();\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 */\nexport function flush(timeout) {\n var client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n logger.warn('Cannot flush events. No client defined.');\n return SyncPromise.resolve(false);\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 */\nexport function close(timeout) {\n var client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n logger.warn('Cannot flush events and disable SDK. No client defined.');\n return SyncPromise.resolve(false);\n}\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function wrap(fn) {\n return internalWrap(fn)();\n}\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking() {\n var window = getGlobalObject();\n var document = window.document;\n if (typeof document === 'undefined') {\n logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n return;\n }\n var hub = getCurrentHub();\n // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and\n // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are\n // pinned at the same version in package.json, but there are edge cases where it's possible. See\n // https://github.com/getsentry/sentry-javascript/issues/3207 and\n // https://github.com/getsentry/sentry-javascript/issues/3234 and\n // https://github.com/getsentry/sentry-javascript/issues/3278.\n if (typeof hub.startSession !== 'function' || typeof hub.captureSession !== 'function') {\n return;\n }\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n // We want to create a session for every navigation as well\n addInstrumentationHandler({\n callback: function (_a) {\n var from = _a.from, to = _a.to;\n // Don't create an additional session for the initial route or if the location did not change\n if (from === undefined || from === to) {\n return;\n }\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n },\n type: 'history',\n });\n}\n//# sourceMappingURL=sdk.js.map","import { __assign } from \"tslib\";\nimport { dropUndefinedKeys, timestampWithMs, uuid4 } from '@sentry/utils';\nimport { SpanStatus } from './spanstatus';\n/**\n * Keeps track of finished spans for a given transaction\n * @internal\n * @hideconstructor\n * @hidden\n */\nvar SpanRecorder = /** @class */ (function () {\n function SpanRecorder(maxlen) {\n if (maxlen === void 0) { maxlen = 1000; }\n this.spans = [];\n this._maxlen = maxlen;\n }\n /**\n * This is just so that we don't run out of memory while recording a lot\n * of spans. At some point we just stop and flush out the start of the\n * trace tree (i.e.the first n spans with the smallest\n * start_timestamp).\n */\n SpanRecorder.prototype.add = function (span) {\n if (this.spans.length > this._maxlen) {\n span.spanRecorder = undefined;\n }\n else {\n this.spans.push(span);\n }\n };\n return SpanRecorder;\n}());\nexport { SpanRecorder };\n/**\n * Span contains all data about a span\n */\nvar Span = /** @class */ (function () {\n /**\n * You should never call the constructor manually, always use `Sentry.startTransaction()`\n * or call `startChild()` on an existing span.\n * @internal\n * @hideconstructor\n * @hidden\n */\n function Span(spanContext) {\n /**\n * @inheritDoc\n */\n this.traceId = uuid4();\n /**\n * @inheritDoc\n */\n this.spanId = uuid4().substring(16);\n /**\n * Timestamp in seconds when the span was created.\n */\n this.startTimestamp = timestampWithMs();\n /**\n * @inheritDoc\n */\n this.tags = {};\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.data = {};\n if (!spanContext) {\n return this;\n }\n if (spanContext.traceId) {\n this.traceId = spanContext.traceId;\n }\n if (spanContext.spanId) {\n this.spanId = spanContext.spanId;\n }\n if (spanContext.parentSpanId) {\n this.parentSpanId = spanContext.parentSpanId;\n }\n // We want to include booleans as well here\n if ('sampled' in spanContext) {\n this.sampled = spanContext.sampled;\n }\n if (spanContext.op) {\n this.op = spanContext.op;\n }\n if (spanContext.description) {\n this.description = spanContext.description;\n }\n if (spanContext.data) {\n this.data = spanContext.data;\n }\n if (spanContext.tags) {\n this.tags = spanContext.tags;\n }\n if (spanContext.status) {\n this.status = spanContext.status;\n }\n if (spanContext.startTimestamp) {\n this.startTimestamp = spanContext.startTimestamp;\n }\n if (spanContext.endTimestamp) {\n this.endTimestamp = spanContext.endTimestamp;\n }\n }\n /**\n * @inheritDoc\n * @deprecated\n */\n Span.prototype.child = function (spanContext) {\n return this.startChild(spanContext);\n };\n /**\n * @inheritDoc\n */\n Span.prototype.startChild = function (spanContext) {\n var childSpan = new Span(__assign(__assign({}, spanContext), { parentSpanId: this.spanId, sampled: this.sampled, traceId: this.traceId }));\n childSpan.spanRecorder = this.spanRecorder;\n if (childSpan.spanRecorder) {\n childSpan.spanRecorder.add(childSpan);\n }\n childSpan.transaction = this.transaction;\n return childSpan;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.setTag = function (key, value) {\n var _a;\n this.tags = __assign(__assign({}, this.tags), (_a = {}, _a[key] = value, _a));\n return this;\n };\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n Span.prototype.setData = function (key, value) {\n var _a;\n this.data = __assign(__assign({}, this.data), (_a = {}, _a[key] = value, _a));\n return this;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.setStatus = function (value) {\n this.status = value;\n return this;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.setHttpStatus = function (httpStatus) {\n this.setTag('http.status_code', String(httpStatus));\n var spanStatus = SpanStatus.fromHttpCode(httpStatus);\n if (spanStatus !== SpanStatus.UnknownError) {\n this.setStatus(spanStatus);\n }\n return this;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.isSuccess = function () {\n return this.status === SpanStatus.Ok;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.finish = function (endTimestamp) {\n this.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampWithMs();\n };\n /**\n * @inheritDoc\n */\n Span.prototype.toTraceparent = function () {\n var sampledString = '';\n if (this.sampled !== undefined) {\n sampledString = this.sampled ? '-1' : '-0';\n }\n return this.traceId + \"-\" + this.spanId + sampledString;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.toContext = function () {\n return dropUndefinedKeys({\n data: this.data,\n description: this.description,\n endTimestamp: this.endTimestamp,\n op: this.op,\n parentSpanId: this.parentSpanId,\n sampled: this.sampled,\n spanId: this.spanId,\n startTimestamp: this.startTimestamp,\n status: this.status,\n tags: this.tags,\n traceId: this.traceId,\n });\n };\n /**\n * @inheritDoc\n */\n Span.prototype.updateWithContext = function (spanContext) {\n var _a, _b, _c, _d, _e;\n this.data = (_a = spanContext.data, (_a !== null && _a !== void 0 ? _a : {}));\n this.description = spanContext.description;\n this.endTimestamp = spanContext.endTimestamp;\n this.op = spanContext.op;\n this.parentSpanId = spanContext.parentSpanId;\n this.sampled = spanContext.sampled;\n this.spanId = (_b = spanContext.spanId, (_b !== null && _b !== void 0 ? _b : this.spanId));\n this.startTimestamp = (_c = spanContext.startTimestamp, (_c !== null && _c !== void 0 ? _c : this.startTimestamp));\n this.status = spanContext.status;\n this.tags = (_d = spanContext.tags, (_d !== null && _d !== void 0 ? _d : {}));\n this.traceId = (_e = spanContext.traceId, (_e !== null && _e !== void 0 ? _e : this.traceId));\n return this;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.getTraceContext = function () {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n trace_id: this.traceId,\n });\n };\n /**\n * @inheritDoc\n */\n Span.prototype.toJSON = function () {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n start_timestamp: this.startTimestamp,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n timestamp: this.endTimestamp,\n trace_id: this.traceId,\n });\n };\n return Span;\n}());\nexport { Span };\n//# sourceMappingURL=span.js.map","import { __assign } from \"tslib\";\nimport { API, captureException, withScope } from '@sentry/core';\nimport { addExceptionMechanism, addExceptionTypeValue, getGlobalObject, logger } from '@sentry/utils';\nvar global = getGlobalObject();\nvar ignoreOnError = 0;\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\n/**\n * @hidden\n */\nexport function ignoreNextOnError() {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(function () {\n ignoreOnError -= 1;\n });\n}\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(fn, options, before) {\n if (options === void 0) { options = {}; }\n if (typeof fn !== 'function') {\n return fn;\n }\n try {\n // We don't wanna wrap it twice\n if (fn.__sentry__) {\n return fn;\n }\n // If this has already been wrapped in the past, return that wrapped function\n if (fn.__sentry_wrapped__) {\n return fn.__sentry_wrapped__;\n }\n }\n catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n /* eslint-disable prefer-rest-params */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var sentryWrapped = function () {\n var args = Array.prototype.slice.call(arguments);\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });\n if (fn.handleEvent) {\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return fn.handleEvent.apply(this, wrappedArguments);\n }\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n }\n catch (ex) {\n ignoreNextOnError();\n withScope(function (scope) {\n scope.addEventProcessor(function (event) {\n var processedEvent = __assign({}, event);\n if (options.mechanism) {\n addExceptionTypeValue(processedEvent, undefined, undefined);\n addExceptionMechanism(processedEvent, options.mechanism);\n }\n processedEvent.extra = __assign(__assign({}, processedEvent.extra), { arguments: args });\n return processedEvent;\n });\n captureException(ex);\n });\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (var property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n }\n catch (_oO) { } // eslint-disable-line no-empty\n fn.prototype = fn.prototype || {};\n sentryWrapped.prototype = fn.prototype;\n Object.defineProperty(fn, '__sentry_wrapped__', {\n enumerable: false,\n value: sentryWrapped,\n });\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n Object.defineProperties(sentryWrapped, {\n __sentry__: {\n enumerable: false,\n value: true,\n },\n __sentry_original__: {\n enumerable: false,\n value: fn,\n },\n });\n // Restore original function name (not all browsers allow that)\n try {\n var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get: function () {\n return fn.name;\n },\n });\n }\n // eslint-disable-next-line no-empty\n }\n catch (_oO) { }\n return sentryWrapped;\n}\n/**\n * Injects the Report Dialog script\n * @hidden\n */\nexport function injectReportDialog(options) {\n if (options === void 0) { options = {}; }\n if (!global.document) {\n return;\n }\n if (!options.eventId) {\n logger.error(\"Missing eventId option in showReportDialog call\");\n return;\n }\n if (!options.dsn) {\n logger.error(\"Missing dsn option in showReportDialog call\");\n return;\n }\n var script = global.document.createElement('script');\n script.async = true;\n script.src = new API(options.dsn).getReportDialogEndpoint(options);\n if (options.onLoad) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n script.onload = options.onLoad;\n }\n var injectionPoint = global.document.head || global.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n }\n}\n//# sourceMappingURL=helpers.js.map","import { __read } from \"tslib\";\nimport { SentryError } from './error';\n/** Regular expression used to parse a Dsn. */\nvar DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n/** Error message */\nvar ERROR_MESSAGE = 'Invalid Dsn';\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nvar Dsn = /** @class */ (function () {\n /** Creates a new Dsn component */\n function Dsn(from) {\n if (typeof from === 'string') {\n this._fromString(from);\n }\n else {\n this._fromComponents(from);\n }\n this._validate();\n }\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n Dsn.prototype.toString = function (withPassword) {\n if (withPassword === void 0) { withPassword = false; }\n var _a = this, host = _a.host, path = _a.path, pass = _a.pass, port = _a.port, projectId = _a.projectId, protocol = _a.protocol, publicKey = _a.publicKey;\n return (protocol + \"://\" + publicKey + (withPassword && pass ? \":\" + pass : '') +\n (\"@\" + host + (port ? \":\" + port : '') + \"/\" + (path ? path + \"/\" : path) + projectId));\n };\n /** Parses a string into this Dsn. */\n Dsn.prototype._fromString = function (str) {\n var match = DSN_REGEX.exec(str);\n if (!match) {\n throw new SentryError(ERROR_MESSAGE);\n }\n var _a = __read(match.slice(1), 6), protocol = _a[0], publicKey = _a[1], _b = _a[2], pass = _b === void 0 ? '' : _b, host = _a[3], _c = _a[4], port = _c === void 0 ? '' : _c, lastPath = _a[5];\n var path = '';\n var projectId = lastPath;\n var split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop();\n }\n if (projectId) {\n var projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n this._fromComponents({ host: host, pass: pass, path: path, projectId: projectId, port: port, protocol: protocol, publicKey: publicKey });\n };\n /** Maps Dsn components into this instance. */\n Dsn.prototype._fromComponents = function (components) {\n // TODO this is for backwards compatibility, and can be removed in a future version\n if ('user' in components && !('publicKey' in components)) {\n components.publicKey = components.user;\n }\n this.user = components.publicKey || '';\n this.protocol = components.protocol;\n this.publicKey = components.publicKey || '';\n this.pass = components.pass || '';\n this.host = components.host;\n this.port = components.port || '';\n this.path = components.path || '';\n this.projectId = components.projectId;\n };\n /** Validates this Dsn and throws on error. */\n Dsn.prototype._validate = function () {\n var _this = this;\n ['protocol', 'publicKey', 'host', 'projectId'].forEach(function (component) {\n if (!_this[component]) {\n throw new SentryError(ERROR_MESSAGE + \": \" + component + \" missing\");\n }\n });\n if (!this.projectId.match(/^\\d+$/)) {\n throw new SentryError(ERROR_MESSAGE + \": Invalid projectId \" + this.projectId);\n }\n if (this.protocol !== 'http' && this.protocol !== 'https') {\n throw new SentryError(ERROR_MESSAGE + \": Invalid protocol \" + this.protocol);\n }\n if (this.port && isNaN(parseInt(this.port, 10))) {\n throw new SentryError(ERROR_MESSAGE + \": Invalid port \" + this.port);\n }\n };\n return Dsn;\n}());\nexport { Dsn };\n//# sourceMappingURL=dsn.js.map","import { __read, __spread } from \"tslib\";\nimport { logger } from '@sentry/utils';\n/**\n * Express integration\n *\n * Provides an request and error handler for Express framework as well as tracing capabilities\n */\nvar Express = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function Express(options) {\n if (options === void 0) { options = {}; }\n /**\n * @inheritDoc\n */\n this.name = Express.id;\n this._router = options.router || options.app;\n this._methods = (Array.isArray(options.methods) ? options.methods : []).concat('use');\n }\n /**\n * @inheritDoc\n */\n Express.prototype.setupOnce = function () {\n if (!this._router) {\n logger.error('ExpressIntegration is missing an Express instance');\n return;\n }\n instrumentMiddlewares(this._router, this._methods);\n };\n /**\n * @inheritDoc\n */\n Express.id = 'Express';\n return Express;\n}());\nexport { Express };\n/**\n * Wraps original middleware function in a tracing call, which stores the info about the call as a span,\n * and finishes it once the middleware is done invoking.\n *\n * Express middlewares have 3 various forms, thus we have to take care of all of them:\n * // sync\n * app.use(function (req, res) { ... })\n * // async\n * app.use(function (req, res, next) { ... })\n * // error handler\n * app.use(function (err, req, res, next) { ... })\n *\n * They all internally delegate to the `router[method]` of the given application instance.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any\nfunction wrap(fn, method) {\n var arity = fn.length;\n switch (arity) {\n case 2: {\n return function (req, res) {\n var transaction = res.__sentry_transaction;\n if (transaction) {\n var span_1 = transaction.startChild({\n description: fn.name,\n op: \"express.middleware.\" + method,\n });\n res.once('finish', function () {\n span_1.finish();\n });\n }\n return fn.call(this, req, res);\n };\n }\n case 3: {\n return function (req, res, next) {\n var _a;\n var transaction = res.__sentry_transaction;\n var span = (_a = transaction) === null || _a === void 0 ? void 0 : _a.startChild({\n description: fn.name,\n op: \"express.middleware.\" + method,\n });\n fn.call(this, req, res, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var _a;\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n next.call.apply(next, __spread([this], args));\n });\n };\n }\n case 4: {\n return function (err, req, res, next) {\n var _a;\n var transaction = res.__sentry_transaction;\n var span = (_a = transaction) === null || _a === void 0 ? void 0 : _a.startChild({\n description: fn.name,\n op: \"express.middleware.\" + method,\n });\n fn.call(this, err, req, res, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var _a;\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n next.call.apply(next, __spread([this], args));\n });\n };\n }\n default: {\n throw new Error(\"Express middleware takes 2-4 arguments. Got: \" + arity);\n }\n }\n}\n/**\n * Takes all the function arguments passed to the original `app` or `router` method, eg. `app.use` or `router.use`\n * and wraps every function, as well as array of functions with a call to our `wrap` method.\n * We have to take care of the arrays as well as iterate over all of the arguments,\n * as `app.use` can accept middlewares in few various forms.\n *\n * app.use([], )\n * app.use([], , ...)\n * app.use([], ...[])\n */\nfunction wrapMiddlewareArgs(args, method) {\n return args.map(function (arg) {\n if (typeof arg === 'function') {\n return wrap(arg, method);\n }\n if (Array.isArray(arg)) {\n return arg.map(function (a) {\n if (typeof a === 'function') {\n return wrap(a, method);\n }\n return a;\n });\n }\n return arg;\n });\n}\n/**\n * Patches original router to utilize our tracing functionality\n */\nfunction patchMiddleware(router, method) {\n var originalCallback = router[method];\n router[method] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return originalCallback.call.apply(originalCallback, __spread([this], wrapMiddlewareArgs(args, method)));\n };\n return router;\n}\n/**\n * Patches original router methods\n */\nfunction instrumentMiddlewares(router, methods) {\n if (methods === void 0) { methods = []; }\n methods.forEach(function (method) { return patchMiddleware(router, method); });\n}\n//# sourceMappingURL=express.js.map","import { fill, isThenable, loadModule, logger } from '@sentry/utils';\n/** Tracing integration for node-postgres package */\nvar Postgres = /** @class */ (function () {\n function Postgres(options) {\n if (options === void 0) { options = {}; }\n /**\n * @inheritDoc\n */\n this.name = Postgres.id;\n this._usePgNative = !!options.usePgNative;\n }\n /**\n * @inheritDoc\n */\n Postgres.prototype.setupOnce = function (_, getCurrentHub) {\n var _a;\n var pkg = loadModule('pg');\n if (!pkg) {\n logger.error('Postgres Integration was unable to require `pg` package.');\n return;\n }\n if (this._usePgNative && !((_a = pkg.native) === null || _a === void 0 ? void 0 : _a.Client)) {\n logger.error(\"Postgres Integration was unable to access 'pg-native' bindings.\");\n return;\n }\n var Client = (this._usePgNative ? pkg.native : pkg).Client;\n /**\n * function (query, callback) => void\n * function (query, params, callback) => void\n * function (query) => Promise\n * function (query, params) => Promise\n * function (pg.Cursor) => pg.Cursor\n */\n fill(Client.prototype, 'query', function (orig) {\n return function (config, values, callback) {\n var _a, _b, _c;\n var scope = getCurrentHub().getScope();\n var parentSpan = (_a = scope) === null || _a === void 0 ? void 0 : _a.getSpan();\n var span = (_b = parentSpan) === null || _b === void 0 ? void 0 : _b.startChild({\n description: typeof config === 'string' ? config : config.text,\n op: \"db\",\n });\n if (typeof callback === 'function') {\n return orig.call(this, config, values, function (err, result) {\n var _a;\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n callback(err, result);\n });\n }\n if (typeof values === 'function') {\n return orig.call(this, config, function (err, result) {\n var _a;\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n values(err, result);\n });\n }\n var rv = typeof values !== 'undefined' ? orig.call(this, config, values) : orig.call(this, config);\n if (isThenable(rv)) {\n return rv.then(function (res) {\n var _a;\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n return res;\n });\n }\n (_c = span) === null || _c === void 0 ? void 0 : _c.finish();\n return rv;\n };\n });\n };\n /**\n * @inheritDoc\n */\n Postgres.id = 'Postgres';\n return Postgres;\n}());\nexport { Postgres };\n//# sourceMappingURL=postgres.js.map","import { fill, loadModule, logger } from '@sentry/utils';\n/** Tracing integration for node-mysql package */\nvar Mysql = /** @class */ (function () {\n function Mysql() {\n /**\n * @inheritDoc\n */\n this.name = Mysql.id;\n }\n /**\n * @inheritDoc\n */\n Mysql.prototype.setupOnce = function (_, getCurrentHub) {\n var pkg = loadModule('mysql/lib/Connection.js');\n if (!pkg) {\n logger.error('Mysql Integration was unable to require `mysql` package.');\n return;\n }\n // The original function will have one of these signatures:\n // function (callback) => void\n // function (options, callback) => void\n // function (options, values, callback) => void\n fill(pkg, 'createQuery', function (orig) {\n return function (options, values, callback) {\n var _a, _b;\n var scope = getCurrentHub().getScope();\n var parentSpan = (_a = scope) === null || _a === void 0 ? void 0 : _a.getSpan();\n var span = (_b = parentSpan) === null || _b === void 0 ? void 0 : _b.startChild({\n description: typeof options === 'string' ? options : options.sql,\n op: \"db\",\n });\n if (typeof callback === 'function') {\n return orig.call(this, options, values, function (err, result, fields) {\n var _a;\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n callback(err, result, fields);\n });\n }\n if (typeof values === 'function') {\n return orig.call(this, options, function (err, result, fields) {\n var _a;\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n values(err, result, fields);\n });\n }\n return orig.call(this, options, values, callback);\n };\n });\n };\n /**\n * @inheritDoc\n */\n Mysql.id = 'Mysql';\n return Mysql;\n}());\nexport { Mysql };\n//# sourceMappingURL=mysql.js.map","import { __read, __spread } from \"tslib\";\nimport { fill, isThenable, loadModule, logger } from '@sentry/utils';\nvar OPERATIONS = [\n 'aggregate',\n 'bulkWrite',\n 'countDocuments',\n 'createIndex',\n 'createIndexes',\n 'deleteMany',\n 'deleteOne',\n 'distinct',\n 'drop',\n 'dropIndex',\n 'dropIndexes',\n 'estimatedDocumentCount',\n 'find',\n 'findOne',\n 'findOneAndDelete',\n 'findOneAndReplace',\n 'findOneAndUpdate',\n 'indexes',\n 'indexExists',\n 'indexInformation',\n 'initializeOrderedBulkOp',\n 'insertMany',\n 'insertOne',\n 'isCapped',\n 'mapReduce',\n 'options',\n 'parallelCollectionScan',\n 'rename',\n 'replaceOne',\n 'stats',\n 'updateMany',\n 'updateOne',\n];\n// All of the operations above take `options` and `callback` as their final parameters, but some of them\n// take additional parameters as well. For those operations, this is a map of\n// { : [] }, as a way to know what to call the operation's\n// positional arguments when we add them to the span's `data` object later\nvar OPERATION_SIGNATURES = {\n // aggregate intentionally not included because `pipeline` arguments are too complex to serialize well\n // see https://github.com/getsentry/sentry-javascript/pull/3102\n bulkWrite: ['operations'],\n countDocuments: ['query'],\n createIndex: ['fieldOrSpec'],\n createIndexes: ['indexSpecs'],\n deleteMany: ['filter'],\n deleteOne: ['filter'],\n distinct: ['key', 'query'],\n dropIndex: ['indexName'],\n find: ['query'],\n findOne: ['query'],\n findOneAndDelete: ['filter'],\n findOneAndReplace: ['filter', 'replacement'],\n findOneAndUpdate: ['filter', 'update'],\n indexExists: ['indexes'],\n insertMany: ['docs'],\n insertOne: ['doc'],\n mapReduce: ['map', 'reduce'],\n rename: ['newName'],\n replaceOne: ['filter', 'doc'],\n updateMany: ['filter', 'update'],\n updateOne: ['filter', 'update'],\n};\n/** Tracing integration for mongo package */\nvar Mongo = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function Mongo(options) {\n if (options === void 0) { options = {}; }\n /**\n * @inheritDoc\n */\n this.name = Mongo.id;\n this._operations = Array.isArray(options.operations)\n ? options.operations\n : OPERATIONS;\n this._describeOperations = 'describeOperations' in options ? options.describeOperations : true;\n this._useMongoose = !!options.useMongoose;\n }\n /**\n * @inheritDoc\n */\n Mongo.prototype.setupOnce = function (_, getCurrentHub) {\n var moduleName = this._useMongoose ? 'mongoose' : 'mongodb';\n var pkg = loadModule(moduleName);\n if (!pkg) {\n logger.error(\"Mongo Integration was unable to require `\" + moduleName + \"` package.\");\n return;\n }\n this._instrumentOperations(pkg.Collection, this._operations, getCurrentHub);\n };\n /**\n * Patches original collection methods\n */\n Mongo.prototype._instrumentOperations = function (collection, operations, getCurrentHub) {\n var _this = this;\n operations.forEach(function (operation) { return _this._patchOperation(collection, operation, getCurrentHub); });\n };\n /**\n * Patches original collection to utilize our tracing functionality\n */\n Mongo.prototype._patchOperation = function (collection, operation, getCurrentHub) {\n if (!(operation in collection.prototype))\n return;\n var getSpanContext = this._getSpanContextFromOperationArguments.bind(this);\n fill(collection.prototype, operation, function (orig) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var _a, _b, _c, _d;\n var lastArg = args[args.length - 1];\n var scope = getCurrentHub().getScope();\n var parentSpan = (_a = scope) === null || _a === void 0 ? void 0 : _a.getSpan();\n // Check if the operation was passed a callback. (mapReduce requires a different check, as\n // its (non-callback) arguments can also be functions.)\n if (typeof lastArg !== 'function' || (operation === 'mapReduce' && args.length === 2)) {\n var span_1 = (_b = parentSpan) === null || _b === void 0 ? void 0 : _b.startChild(getSpanContext(this, operation, args));\n var maybePromise = orig.call.apply(orig, __spread([this], args));\n if (isThenable(maybePromise)) {\n return maybePromise.then(function (res) {\n var _a;\n (_a = span_1) === null || _a === void 0 ? void 0 : _a.finish();\n return res;\n });\n }\n else {\n (_c = span_1) === null || _c === void 0 ? void 0 : _c.finish();\n return maybePromise;\n }\n }\n var span = (_d = parentSpan) === null || _d === void 0 ? void 0 : _d.startChild(getSpanContext(this, operation, args.slice(0, -1)));\n return orig.call.apply(orig, __spread([this], args.slice(0, -1), [function (err, result) {\n var _a;\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n lastArg(err, result);\n }]));\n };\n });\n };\n /**\n * Form a SpanContext based on the user input to a given operation.\n */\n Mongo.prototype._getSpanContextFromOperationArguments = function (collection, operation, args) {\n var data = {\n collectionName: collection.collectionName,\n dbName: collection.dbName,\n namespace: collection.namespace,\n };\n var spanContext = {\n op: \"db\",\n description: operation,\n data: data,\n };\n // If the operation takes no arguments besides `options` and `callback`, or if argument\n // collection is disabled for this operation, just return early.\n var signature = OPERATION_SIGNATURES[operation];\n var shouldDescribe = Array.isArray(this._describeOperations)\n ? this._describeOperations.includes(operation)\n : this._describeOperations;\n if (!signature || !shouldDescribe) {\n return spanContext;\n }\n try {\n // Special case for `mapReduce`, as the only one accepting functions as arguments.\n if (operation === 'mapReduce') {\n var _a = __read(args, 2), map = _a[0], reduce = _a[1];\n data[signature[0]] = typeof map === 'string' ? map : map.name || '';\n data[signature[1]] = typeof reduce === 'string' ? reduce : reduce.name || '';\n }\n else {\n for (var i = 0; i < signature.length; i++) {\n data[signature[i]] = JSON.stringify(args[i]);\n }\n }\n }\n catch (_oO) {\n // no-empty\n }\n return spanContext;\n };\n /**\n * @inheritDoc\n */\n Mongo.id = 'Mongo';\n return Mongo;\n}());\nexport { Mongo };\n//# sourceMappingURL=mongo.js.map","import { getGlobalObject, logger } from '@sentry/utils';\nimport { FINISH_REASON_TAG, IDLE_TRANSACTION_FINISH_REASONS } from '../constants';\nimport { SpanStatus } from '../spanstatus';\nimport { getActiveTransaction } from '../utils';\nvar global = getGlobalObject();\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nexport function registerBackgroundTabDetection() {\n if (global && global.document) {\n global.document.addEventListener('visibilitychange', function () {\n var activeTransaction = getActiveTransaction();\n if (global.document.hidden && activeTransaction) {\n logger.log(\"[Tracing] Transaction: \" + SpanStatus.Cancelled + \" -> since tab moved to the background, op: \" + activeTransaction.op);\n // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n if (!activeTransaction.status) {\n activeTransaction.setStatus(SpanStatus.Cancelled);\n }\n activeTransaction.setTag('visibilitychange', 'document.hidden');\n activeTransaction.setTag(FINISH_REASON_TAG, IDLE_TRANSACTION_FINISH_REASONS[2]);\n activeTransaction.finish();\n }\n });\n }\n else {\n logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}\n//# sourceMappingURL=backgroundtab.js.map","/*\n * Copyright 2020 Google LLC\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 * https://www.apache.org/licenses/LICENSE-2.0\n *\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 */\nexport var bindReporter = function (callback, metric, reportAllChanges) {\n var prevValue;\n return function (forceReport) {\n if (metric.value >= 0) {\n if (forceReport || reportAllChanges) {\n metric.delta = metric.value - (prevValue || 0);\n // Report the metric if there's a non-zero delta or if no previous\n // value exists (which can happen in the case of the document becoming\n // hidden when the metric value is 0).\n // See: https://github.com/GoogleChrome/web-vitals/issues/14\n if (metric.delta || prevValue === undefined) {\n prevValue = metric.value;\n callback(metric);\n }\n }\n }\n };\n};\n//# sourceMappingURL=bindReporter.js.map","/*\n * Copyright 2020 Google LLC\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 * https://www.apache.org/licenses/LICENSE-2.0\n *\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 */\nimport { generateUniqueID } from './generateUniqueID';\nexport var initMetric = function (name, value) {\n return {\n name: name,\n value: (value !== null && value !== void 0 ? value : -1),\n delta: 0,\n entries: [],\n id: generateUniqueID(),\n };\n};\n//# sourceMappingURL=initMetric.js.map","/*\n * Copyright 2020 Google LLC\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 * https://www.apache.org/licenses/LICENSE-2.0\n *\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 */\n/**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */\nexport var generateUniqueID = function () {\n return \"v2-\" + Date.now() + \"-\" + (Math.floor(Math.random() * (9e12 - 1)) + 1e12);\n};\n//# sourceMappingURL=generateUniqueID.js.map","/*\n * Copyright 2020 Google LLC\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 * https://www.apache.org/licenses/LICENSE-2.0\n *\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 */\n/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nexport var observe = function (type, callback) {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n // More extensive feature detect needed for Firefox due to:\n // https://github.com/GoogleChrome/web-vitals/issues/142\n if (type === 'first-input' && !('PerformanceEventTiming' in self)) {\n return;\n }\n var po = new PerformanceObserver(function (l) { return l.getEntries().map(callback); });\n po.observe({ type: type, buffered: true });\n return po;\n }\n }\n catch (e) {\n // Do nothing.\n }\n return;\n};\n//# sourceMappingURL=observe.js.map","/*\n * Copyright 2020 Google LLC\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 * https://www.apache.org/licenses/LICENSE-2.0\n *\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 */\nimport { getGlobalObject } from '@sentry/utils';\nexport var onHidden = function (cb, once) {\n var onHiddenOrPageHide = function (event) {\n if (event.type === 'pagehide' || getGlobalObject().document.visibilityState === 'hidden') {\n cb(event);\n if (once) {\n removeEventListener('visibilitychange', onHiddenOrPageHide, true);\n removeEventListener('pagehide', onHiddenOrPageHide, true);\n }\n }\n };\n addEventListener('visibilitychange', onHiddenOrPageHide, true);\n // Some browsers have buggy implementations of visibilitychange,\n // so we use pagehide in addition, just to be safe.\n addEventListener('pagehide', onHiddenOrPageHide, true);\n};\n//# sourceMappingURL=onHidden.js.map","/*\n * Copyright 2020 Google LLC\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 * https://www.apache.org/licenses/LICENSE-2.0\n *\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 */\nimport { getGlobalObject } from '@sentry/utils';\nimport { onHidden } from './onHidden';\nvar firstHiddenTime = -1;\nvar initHiddenTime = function () {\n return getGlobalObject().document.visibilityState === 'hidden' ? 0 : Infinity;\n};\nvar trackChanges = function () {\n // Update the time if/when the document becomes hidden.\n onHidden(function (_a) {\n var timeStamp = _a.timeStamp;\n firstHiddenTime = timeStamp;\n }, true);\n};\nexport var getVisibilityWatcher = function () {\n if (firstHiddenTime < 0) {\n // If the document is hidden when this code runs, assume it was hidden\n // since navigation start. This isn't a perfect heuristic, but it's the\n // best we can do until an API is available to support querying past\n // visibilityState.\n firstHiddenTime = initHiddenTime();\n trackChanges();\n }\n return {\n get firstHiddenTime() {\n return firstHiddenTime;\n },\n };\n};\n//# sourceMappingURL=getVisibilityWatcher.js.map","/*\n * Copyright 2020 Google LLC\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 * https://www.apache.org/licenses/LICENSE-2.0\n *\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 */\nimport { bindReporter } from './lib/bindReporter';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nvar reportedMetricIDs = {};\nexport var getLCP = function (onReport, reportAllChanges) {\n var visibilityWatcher = getVisibilityWatcher();\n var metric = initMetric('LCP');\n var report;\n var entryHandler = function (entry) {\n // The startTime attribute returns the value of the renderTime if it is not 0,\n // and the value of the loadTime otherwise.\n var value = entry.startTime;\n // If the page was hidden prior to paint time of the entry,\n // ignore it and mark the metric as final, otherwise add the entry.\n if (value < visibilityWatcher.firstHiddenTime) {\n metric.value = value;\n metric.entries.push(entry);\n }\n if (report) {\n report();\n }\n };\n var po = observe('largest-contentful-paint', entryHandler);\n if (po) {\n report = bindReporter(onReport, metric, reportAllChanges);\n var stopListening_1 = function () {\n if (!reportedMetricIDs[metric.id]) {\n po.takeRecords().map(entryHandler);\n po.disconnect();\n reportedMetricIDs[metric.id] = true;\n report(true);\n }\n };\n // Stop listening after input. Note: while scrolling is an input that\n // stop LCP observation, it's unreliable since it can be programmatically\n // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75\n ['keydown', 'click'].forEach(function (type) {\n addEventListener(type, stopListening_1, { once: true, capture: true });\n });\n onHidden(stopListening_1, true);\n }\n};\n//# sourceMappingURL=getLCP.js.map","import { __assign, __rest } from \"tslib\";\nimport { browserPerformanceTimeOrigin, getGlobalObject, htmlTreeAsString, isNodeEnv, logger } from '@sentry/utils';\nimport { msToSec } from '../utils';\nimport { getCLS } from './web-vitals/getCLS';\nimport { getFID } from './web-vitals/getFID';\nimport { getLCP } from './web-vitals/getLCP';\nimport { getVisibilityWatcher } from './web-vitals/lib/getVisibilityWatcher';\nvar global = getGlobalObject();\n/** Class tracking metrics */\nvar MetricsInstrumentation = /** @class */ (function () {\n function MetricsInstrumentation(_reportAllChanges) {\n if (_reportAllChanges === void 0) { _reportAllChanges = false; }\n var _a, _b;\n this._reportAllChanges = _reportAllChanges;\n this._measurements = {};\n this._performanceCursor = 0;\n if (!isNodeEnv() && ((_a = global) === null || _a === void 0 ? void 0 : _a.performance) && ((_b = global) === null || _b === void 0 ? void 0 : _b.document)) {\n if (global.performance.mark) {\n global.performance.mark('sentry-tracing-init');\n }\n this._trackCLS();\n this._trackLCP();\n this._trackFID();\n }\n }\n /** Add performance related spans to a transaction */\n MetricsInstrumentation.prototype.addPerformanceEntries = function (transaction) {\n var _this = this;\n if (!global || !global.performance || !global.performance.getEntries || !browserPerformanceTimeOrigin) {\n // Gatekeeper if performance API not available\n return;\n }\n logger.log('[Tracing] Adding & adjusting spans using Performance API');\n var timeOrigin = msToSec(browserPerformanceTimeOrigin);\n var entryScriptSrc;\n if (global.document && global.document.scripts) {\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (var i = 0; i < global.document.scripts.length; i++) {\n // We go through all scripts on the page and look for 'data-entry'\n // We remember the name and measure the time between this script finished loading and\n // our mark 'sentry-tracing-init'\n if (global.document.scripts[i].dataset.entry === 'true') {\n entryScriptSrc = global.document.scripts[i].src;\n break;\n }\n }\n }\n var entryScriptStartTimestamp;\n var tracingInitMarkStartTime;\n var responseStartTimestamp;\n var requestStartTimestamp;\n global.performance\n .getEntries()\n .slice(this._performanceCursor)\n .forEach(function (entry) {\n var startTime = msToSec(entry.startTime);\n var duration = msToSec(entry.duration);\n if (transaction.op === 'navigation' && timeOrigin + startTime < transaction.startTimestamp) {\n return;\n }\n switch (entry.entryType) {\n case 'navigation': {\n addNavigationSpans(transaction, entry, timeOrigin);\n responseStartTimestamp = timeOrigin + msToSec(entry.responseStart);\n requestStartTimestamp = timeOrigin + msToSec(entry.requestStart);\n break;\n }\n case 'mark':\n case 'paint':\n case 'measure': {\n var startTimestamp = addMeasureSpans(transaction, entry, startTime, duration, timeOrigin);\n if (tracingInitMarkStartTime === undefined && entry.name === 'sentry-tracing-init') {\n tracingInitMarkStartTime = startTimestamp;\n }\n // capture web vitals\n var firstHidden = getVisibilityWatcher();\n // Only report if the page wasn't hidden prior to the web vital.\n var shouldRecord = entry.startTime < firstHidden.firstHiddenTime;\n if (entry.name === 'first-paint' && shouldRecord) {\n logger.log('[Measurements] Adding FP');\n _this._measurements['fp'] = { value: entry.startTime };\n _this._measurements['mark.fp'] = { value: startTimestamp };\n }\n if (entry.name === 'first-contentful-paint' && shouldRecord) {\n logger.log('[Measurements] Adding FCP');\n _this._measurements['fcp'] = { value: entry.startTime };\n _this._measurements['mark.fcp'] = { value: startTimestamp };\n }\n break;\n }\n case 'resource': {\n var resourceName = entry.name.replace(global.location.origin, '');\n var endTimestamp = addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin);\n // We remember the entry script end time to calculate the difference to the first init mark\n if (entryScriptStartTimestamp === undefined && (entryScriptSrc || '').indexOf(resourceName) > -1) {\n entryScriptStartTimestamp = endTimestamp;\n }\n break;\n }\n default:\n // Ignore other entry types.\n }\n });\n if (entryScriptStartTimestamp !== undefined && tracingInitMarkStartTime !== undefined) {\n _startChild(transaction, {\n description: 'evaluation',\n endTimestamp: tracingInitMarkStartTime,\n op: 'script',\n startTimestamp: entryScriptStartTimestamp,\n });\n }\n this._performanceCursor = Math.max(performance.getEntries().length - 1, 0);\n this._trackNavigator(transaction);\n // Measurements are only available for pageload transactions\n if (transaction.op === 'pageload') {\n // normalize applicable web vital values to be relative to transaction.startTimestamp\n var timeOrigin_1 = msToSec(browserPerformanceTimeOrigin);\n // Generate TTFB (Time to First Byte), which measured as the time between the beginning of the transaction and the\n // start of the response in milliseconds\n if (typeof responseStartTimestamp === 'number') {\n logger.log('[Measurements] Adding TTFB');\n this._measurements['ttfb'] = { value: (responseStartTimestamp - transaction.startTimestamp) * 1000 };\n if (typeof requestStartTimestamp === 'number' && requestStartTimestamp <= responseStartTimestamp) {\n // Capture the time spent making the request and receiving the first byte of the response.\n // This is the time between the start of the request and the start of the response in milliseconds.\n this._measurements['ttfb.requestTime'] = { value: (responseStartTimestamp - requestStartTimestamp) * 1000 };\n }\n }\n ['fcp', 'fp', 'lcp'].forEach(function (name) {\n if (!_this._measurements[name] || timeOrigin_1 >= transaction.startTimestamp) {\n return;\n }\n // The web vitals, fcp, fp, lcp, and ttfb, all measure relative to timeOrigin.\n // Unfortunately, timeOrigin is not captured within the transaction span data, so these web vitals will need\n // to be adjusted to be relative to transaction.startTimestamp.\n var oldValue = _this._measurements[name].value;\n var measurementTimestamp = timeOrigin_1 + msToSec(oldValue);\n // normalizedValue should be in milliseconds\n var normalizedValue = Math.abs((measurementTimestamp - transaction.startTimestamp) * 1000);\n var delta = normalizedValue - oldValue;\n logger.log(\"[Measurements] Normalized \" + name + \" from \" + oldValue + \" to \" + normalizedValue + \" (\" + delta + \")\");\n _this._measurements[name].value = normalizedValue;\n });\n if (this._measurements['mark.fid'] && this._measurements['fid']) {\n // create span for FID\n _startChild(transaction, {\n description: 'first input delay',\n endTimestamp: this._measurements['mark.fid'].value + msToSec(this._measurements['fid'].value),\n op: 'web.vitals',\n startTimestamp: this._measurements['mark.fid'].value,\n });\n }\n // If FCP is not recorded we should not record the cls value\n // according to the new definition of CLS.\n if (!('fcp' in this._measurements)) {\n delete this._measurements.cls;\n }\n transaction.setMeasurements(this._measurements);\n this._tagMetricInfo(transaction);\n transaction.setTag('sentry_reportAllChanges', this._reportAllChanges);\n }\n };\n /** Add LCP / CLS data to transaction to allow debugging */\n MetricsInstrumentation.prototype._tagMetricInfo = function (transaction) {\n if (this._lcpEntry) {\n logger.log('[Measurements] Adding LCP Data');\n // Capture Properties of the LCP element that contributes to the LCP.\n if (this._lcpEntry.element) {\n transaction.setTag('lcp.element', htmlTreeAsString(this._lcpEntry.element));\n }\n if (this._lcpEntry.id) {\n transaction.setTag('lcp.id', this._lcpEntry.id);\n }\n if (this._lcpEntry.url) {\n // Trim URL to the first 200 characters.\n transaction.setTag('lcp.url', this._lcpEntry.url.trim().slice(0, 200));\n }\n transaction.setTag('lcp.size', this._lcpEntry.size);\n }\n // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift\n if (this._clsEntry && this._clsEntry.sources) {\n logger.log('[Measurements] Adding CLS Data');\n this._clsEntry.sources.forEach(function (source, index) {\n return transaction.setTag(\"cls.source.\" + (index + 1), htmlTreeAsString(source.node));\n });\n }\n };\n /** Starts tracking the Cumulative Layout Shift on the current page. */\n MetricsInstrumentation.prototype._trackCLS = function () {\n var _this = this;\n // See:\n // https://web.dev/evolving-cls/\n // https://web.dev/cls-web-tooling/\n getCLS(function (metric) {\n var entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n logger.log('[Measurements] Adding CLS');\n _this._measurements['cls'] = { value: metric.value };\n _this._clsEntry = entry;\n });\n };\n /**\n * Capture the information of the user agent.\n */\n MetricsInstrumentation.prototype._trackNavigator = function (transaction) {\n var navigator = global.navigator;\n if (!navigator) {\n return;\n }\n // track network connectivity\n var connection = navigator.connection;\n if (connection) {\n if (connection.effectiveType) {\n transaction.setTag('effectiveConnectionType', connection.effectiveType);\n }\n if (connection.type) {\n transaction.setTag('connectionType', connection.type);\n }\n if (isMeasurementValue(connection.rtt)) {\n this._measurements['connection.rtt'] = { value: connection.rtt };\n }\n if (isMeasurementValue(connection.downlink)) {\n this._measurements['connection.downlink'] = { value: connection.downlink };\n }\n }\n if (isMeasurementValue(navigator.deviceMemory)) {\n transaction.setTag('deviceMemory', String(navigator.deviceMemory));\n }\n if (isMeasurementValue(navigator.hardwareConcurrency)) {\n transaction.setTag('hardwareConcurrency', String(navigator.hardwareConcurrency));\n }\n };\n /** Starts tracking the Largest Contentful Paint on the current page. */\n MetricsInstrumentation.prototype._trackLCP = function () {\n var _this = this;\n getLCP(function (metric) {\n var entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n var timeOrigin = msToSec(browserPerformanceTimeOrigin);\n var startTime = msToSec(entry.startTime);\n logger.log('[Measurements] Adding LCP');\n _this._measurements['lcp'] = { value: metric.value };\n _this._measurements['mark.lcp'] = { value: timeOrigin + startTime };\n _this._lcpEntry = entry;\n }, this._reportAllChanges);\n };\n /** Starts tracking the First Input Delay on the current page. */\n MetricsInstrumentation.prototype._trackFID = function () {\n var _this = this;\n getFID(function (metric) {\n var entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n var timeOrigin = msToSec(browserPerformanceTimeOrigin);\n var startTime = msToSec(entry.startTime);\n logger.log('[Measurements] Adding FID');\n _this._measurements['fid'] = { value: metric.value };\n _this._measurements['mark.fid'] = { value: timeOrigin + startTime };\n });\n };\n return MetricsInstrumentation;\n}());\nexport { MetricsInstrumentation };\n/** Instrument navigation entries */\nfunction addNavigationSpans(transaction, entry, timeOrigin) {\n addPerformanceNavigationTiming({ transaction: transaction, entry: entry, event: 'unloadEvent', timeOrigin: timeOrigin });\n addPerformanceNavigationTiming({ transaction: transaction, entry: entry, event: 'redirect', timeOrigin: timeOrigin });\n addPerformanceNavigationTiming({ transaction: transaction, entry: entry, event: 'domContentLoadedEvent', timeOrigin: timeOrigin });\n addPerformanceNavigationTiming({ transaction: transaction, entry: entry, event: 'loadEvent', timeOrigin: timeOrigin });\n addPerformanceNavigationTiming({ transaction: transaction, entry: entry, event: 'connect', timeOrigin: timeOrigin });\n addPerformanceNavigationTiming({\n transaction: transaction,\n entry: entry,\n event: 'secureConnection',\n timeOrigin: timeOrigin,\n eventEnd: 'connectEnd',\n description: 'TLS/SSL',\n });\n addPerformanceNavigationTiming({\n transaction: transaction,\n entry: entry,\n event: 'fetch',\n timeOrigin: timeOrigin,\n eventEnd: 'domainLookupStart',\n description: 'cache',\n });\n addPerformanceNavigationTiming({ transaction: transaction, entry: entry, event: 'domainLookup', timeOrigin: timeOrigin, description: 'DNS' });\n addRequest(transaction, entry, timeOrigin);\n}\n/** Create measure related spans */\nfunction addMeasureSpans(transaction, entry, startTime, duration, timeOrigin) {\n var measureStartTimestamp = timeOrigin + startTime;\n var measureEndTimestamp = measureStartTimestamp + duration;\n _startChild(transaction, {\n description: entry.name,\n endTimestamp: measureEndTimestamp,\n op: entry.entryType,\n startTimestamp: measureStartTimestamp,\n });\n return measureStartTimestamp;\n}\n/** Create resource-related spans */\nexport function addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin) {\n // we already instrument based on fetch and xhr, so we don't need to\n // duplicate spans here.\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n return undefined;\n }\n var data = {};\n if ('transferSize' in entry) {\n data['Transfer Size'] = entry.transferSize;\n }\n if ('encodedBodySize' in entry) {\n data['Encoded Body Size'] = entry.encodedBodySize;\n }\n if ('decodedBodySize' in entry) {\n data['Decoded Body Size'] = entry.decodedBodySize;\n }\n var startTimestamp = timeOrigin + startTime;\n var endTimestamp = startTimestamp + duration;\n _startChild(transaction, {\n description: resourceName,\n endTimestamp: endTimestamp,\n op: entry.initiatorType ? \"resource.\" + entry.initiatorType : 'resource',\n startTimestamp: startTimestamp,\n data: data,\n });\n return endTimestamp;\n}\n/** Create performance navigation related spans */\nfunction addPerformanceNavigationTiming(props) {\n var transaction = props.transaction, entry = props.entry, event = props.event, timeOrigin = props.timeOrigin, eventEnd = props.eventEnd, description = props.description;\n var end = eventEnd ? entry[eventEnd] : entry[event + \"End\"];\n var start = entry[event + \"Start\"];\n if (!start || !end) {\n return;\n }\n _startChild(transaction, {\n op: 'browser',\n description: (description !== null && description !== void 0 ? description : event),\n startTimestamp: timeOrigin + msToSec(start),\n endTimestamp: timeOrigin + msToSec(end),\n });\n}\n/** Create request and response related spans */\nfunction addRequest(transaction, entry, timeOrigin) {\n _startChild(transaction, {\n op: 'browser',\n description: 'request',\n startTimestamp: timeOrigin + msToSec(entry.requestStart),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd),\n });\n _startChild(transaction, {\n op: 'browser',\n description: 'response',\n startTimestamp: timeOrigin + msToSec(entry.responseStart),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd),\n });\n}\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */\nexport function _startChild(transaction, _a) {\n var startTimestamp = _a.startTimestamp, ctx = __rest(_a, [\"startTimestamp\"]);\n if (startTimestamp && transaction.startTimestamp > startTimestamp) {\n transaction.startTimestamp = startTimestamp;\n }\n return transaction.startChild(__assign({ startTimestamp: startTimestamp }, ctx));\n}\n/**\n * Checks if a given value is a valid measurement value.\n */\nfunction isMeasurementValue(value) {\n return typeof value === 'number' && isFinite(value);\n}\n//# sourceMappingURL=metrics.js.map","/*\n * Copyright 2020 Google LLC\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 * https://www.apache.org/licenses/LICENSE-2.0\n *\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 */\nimport { bindReporter } from './lib/bindReporter';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nexport var getCLS = function (onReport, reportAllChanges) {\n var metric = initMetric('CLS', 0);\n var report;\n var sessionValue = 0;\n var sessionEntries = [];\n var entryHandler = function (entry) {\n // Only count layout shifts without recent user input.\n // TODO: Figure out why entry can be undefined\n if (entry && !entry.hadRecentInput) {\n var firstSessionEntry = sessionEntries[0];\n var lastSessionEntry = sessionEntries[sessionEntries.length - 1];\n // If the entry occurred less than 1 second after the previous entry and\n // less than 5 seconds after the first entry in the session, include the\n // entry in the current session. Otherwise, start a new session.\n if (sessionValue &&\n sessionEntries.length !== 0 &&\n entry.startTime - lastSessionEntry.startTime < 1000 &&\n entry.startTime - firstSessionEntry.startTime < 5000) {\n sessionValue += entry.value;\n sessionEntries.push(entry);\n }\n else {\n sessionValue = entry.value;\n sessionEntries = [entry];\n }\n // If the current session value is larger than the current CLS value,\n // update CLS and the entries contributing to it.\n if (sessionValue > metric.value) {\n metric.value = sessionValue;\n metric.entries = sessionEntries;\n if (report) {\n report();\n }\n }\n }\n };\n var po = observe('layout-shift', entryHandler);\n if (po) {\n report = bindReporter(onReport, metric, reportAllChanges);\n onHidden(function () {\n po.takeRecords().map(entryHandler);\n report(true);\n });\n }\n};\n//# sourceMappingURL=getCLS.js.map","/*\n * Copyright 2020 Google LLC\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 * https://www.apache.org/licenses/LICENSE-2.0\n *\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 */\nimport { bindReporter } from './lib/bindReporter';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nexport var getFID = function (onReport, reportAllChanges) {\n var visibilityWatcher = getVisibilityWatcher();\n var metric = initMetric('FID');\n var report;\n var entryHandler = function (entry) {\n // Only report if the page wasn't hidden prior to the first input.\n if (report && entry.startTime < visibilityWatcher.firstHiddenTime) {\n metric.value = entry.processingStart - entry.startTime;\n metric.entries.push(entry);\n report(true);\n }\n };\n var po = observe('first-input', entryHandler);\n if (po) {\n report = bindReporter(onReport, metric, reportAllChanges);\n onHidden(function () {\n po.takeRecords().map(entryHandler);\n po.disconnect();\n }, true);\n }\n};\n//# sourceMappingURL=getFID.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { addInstrumentationHandler, isInstanceOf, isMatchingPattern } from '@sentry/utils';\nimport { SpanStatus } from '../spanstatus';\nimport { getActiveTransaction, hasTracingEnabled } from '../utils';\nexport var DEFAULT_TRACING_ORIGINS = ['localhost', /^\\//];\nexport var defaultRequestInstrumentationOptions = {\n traceFetch: true,\n traceXHR: true,\n tracingOrigins: DEFAULT_TRACING_ORIGINS,\n};\n/** Registers span creators for xhr and fetch requests */\nexport function instrumentOutgoingRequests(_options) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _a = __assign(__assign({}, defaultRequestInstrumentationOptions), _options), traceFetch = _a.traceFetch, traceXHR = _a.traceXHR, tracingOrigins = _a.tracingOrigins, shouldCreateSpanForRequest = _a.shouldCreateSpanForRequest;\n // We should cache url -> decision so that we don't have to compute\n // regexp everytime we create a request.\n var urlMap = {};\n var defaultShouldCreateSpan = function (url) {\n if (urlMap[url]) {\n return urlMap[url];\n }\n var origins = tracingOrigins;\n urlMap[url] =\n origins.some(function (origin) { return isMatchingPattern(url, origin); }) &&\n !isMatchingPattern(url, 'sentry_key');\n return urlMap[url];\n };\n // We want that our users don't have to re-implement shouldCreateSpanForRequest themselves\n // That's why we filter out already unwanted Spans from tracingOrigins\n var shouldCreateSpan = defaultShouldCreateSpan;\n if (typeof shouldCreateSpanForRequest === 'function') {\n shouldCreateSpan = function (url) {\n return defaultShouldCreateSpan(url) && shouldCreateSpanForRequest(url);\n };\n }\n var spans = {};\n if (traceFetch) {\n addInstrumentationHandler({\n callback: function (handlerData) {\n fetchCallback(handlerData, shouldCreateSpan, spans);\n },\n type: 'fetch',\n });\n }\n if (traceXHR) {\n addInstrumentationHandler({\n callback: function (handlerData) {\n xhrCallback(handlerData, shouldCreateSpan, spans);\n },\n type: 'xhr',\n });\n }\n}\n/**\n * Create and track fetch request spans\n */\nexport function fetchCallback(handlerData, shouldCreateSpan, spans) {\n if (!hasTracingEnabled() || !(handlerData.fetchData && shouldCreateSpan(handlerData.fetchData.url))) {\n return;\n }\n if (handlerData.endTimestamp && handlerData.fetchData.__span) {\n var span = spans[handlerData.fetchData.__span];\n if (span) {\n if (handlerData.response) {\n // TODO (kmclb) remove this once types PR goes through\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n span.setHttpStatus(handlerData.response.status);\n }\n else if (handlerData.error) {\n span.setStatus(SpanStatus.InternalError);\n }\n span.finish();\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[handlerData.fetchData.__span];\n }\n return;\n }\n var activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n var span = activeTransaction.startChild({\n data: __assign(__assign({}, handlerData.fetchData), { type: 'fetch' }),\n description: handlerData.fetchData.method + \" \" + handlerData.fetchData.url,\n op: 'http.client',\n });\n handlerData.fetchData.__span = span.spanId;\n spans[span.spanId] = span;\n var request = (handlerData.args[0] = handlerData.args[0]);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var options = (handlerData.args[1] = handlerData.args[1] || {});\n var headers = options.headers;\n if (isInstanceOf(request, Request)) {\n headers = request.headers;\n }\n if (headers) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (typeof headers.append === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n headers.append('sentry-trace', span.toTraceparent());\n }\n else if (Array.isArray(headers)) {\n headers = __spread(headers, [['sentry-trace', span.toTraceparent()]]);\n }\n else {\n headers = __assign(__assign({}, headers), { 'sentry-trace': span.toTraceparent() });\n }\n }\n else {\n headers = { 'sentry-trace': span.toTraceparent() };\n }\n options.headers = headers;\n }\n}\n/**\n * Create and track xhr request spans\n */\nexport function xhrCallback(handlerData, shouldCreateSpan, spans) {\n var _a, _b;\n if (!hasTracingEnabled() || ((_a = handlerData.xhr) === null || _a === void 0 ? void 0 : _a.__sentry_own_request__) ||\n !(((_b = handlerData.xhr) === null || _b === void 0 ? void 0 : _b.__sentry_xhr__) && shouldCreateSpan(handlerData.xhr.__sentry_xhr__.url))) {\n return;\n }\n var xhr = handlerData.xhr.__sentry_xhr__;\n // check first if the request has finished and is tracked by an existing span which should now end\n if (handlerData.endTimestamp && handlerData.xhr.__sentry_xhr_span_id__) {\n var span = spans[handlerData.xhr.__sentry_xhr_span_id__];\n if (span) {\n span.setHttpStatus(xhr.status_code);\n span.finish();\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[handlerData.xhr.__sentry_xhr_span_id__];\n }\n return;\n }\n // if not, create a new span to track it\n var activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n var span = activeTransaction.startChild({\n data: __assign(__assign({}, xhr.data), { type: 'xhr', method: xhr.method, url: xhr.url }),\n description: xhr.method + \" \" + xhr.url,\n op: 'http.client',\n });\n handlerData.xhr.__sentry_xhr_span_id__ = span.spanId;\n spans[handlerData.xhr.__sentry_xhr_span_id__] = span;\n if (handlerData.xhr.setRequestHeader) {\n try {\n handlerData.xhr.setRequestHeader('sentry-trace', span.toTraceparent());\n }\n catch (_) {\n // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n }\n }\n }\n}\n//# sourceMappingURL=request.js.map","import { addInstrumentationHandler, getGlobalObject, logger } from '@sentry/utils';\nvar global = getGlobalObject();\n/**\n * Default function implementing pageload and navigation transactions\n */\nexport function instrumentRoutingWithDefaults(customStartTransaction, startTransactionOnPageLoad, startTransactionOnLocationChange) {\n if (startTransactionOnPageLoad === void 0) { startTransactionOnPageLoad = true; }\n if (startTransactionOnLocationChange === void 0) { startTransactionOnLocationChange = true; }\n if (!global || !global.location) {\n logger.warn('Could not initialize routing instrumentation due to invalid location');\n return;\n }\n var startingUrl = global.location.href;\n var activeTransaction;\n if (startTransactionOnPageLoad) {\n activeTransaction = customStartTransaction({ name: global.location.pathname, op: 'pageload' });\n }\n if (startTransactionOnLocationChange) {\n addInstrumentationHandler({\n callback: function (_a) {\n var to = _a.to, from = _a.from;\n /**\n * This early return is there to account for some cases where a navigation transaction starts right after\n * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n * create an uneccessary navigation transaction.\n *\n * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n * only be caused in certain development environments where the usage of a hot module reloader is causing\n * errors.\n */\n if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {\n startingUrl = undefined;\n return;\n }\n if (from !== to) {\n startingUrl = undefined;\n if (activeTransaction) {\n logger.log(\"[Tracing] Finishing current transaction with op: \" + activeTransaction.op);\n // If there's an open transaction on the scope, we need to finish it before creating an new one.\n activeTransaction.finish();\n }\n activeTransaction = customStartTransaction({ name: global.location.pathname, op: 'navigation' });\n }\n },\n type: 'history',\n });\n }\n}\n//# sourceMappingURL=router.js.map","import { __assign } from \"tslib\";\nimport { getGlobalObject, logger } from '@sentry/utils';\nimport { startIdleTransaction } from '../hubextensions';\nimport { DEFAULT_IDLE_TIMEOUT } from '../idletransaction';\nimport { SpanStatus } from '../spanstatus';\nimport { extractTraceparentData, secToMs } from '../utils';\nimport { registerBackgroundTabDetection } from './backgroundtab';\nimport { MetricsInstrumentation } from './metrics';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests, } from './request';\nimport { instrumentRoutingWithDefaults } from './router';\nexport var DEFAULT_MAX_TRANSACTION_DURATION_SECONDS = 600;\nvar DEFAULT_BROWSER_TRACING_OPTIONS = __assign({ idleTimeout: DEFAULT_IDLE_TIMEOUT, markBackgroundTransactions: true, maxTransactionDuration: DEFAULT_MAX_TRANSACTION_DURATION_SECONDS, routingInstrumentation: instrumentRoutingWithDefaults, startTransactionOnLocationChange: true, startTransactionOnPageLoad: true }, defaultRequestInstrumentationOptions);\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library. This integration uses {@see IdleTransaction} to create transactions.\n */\nvar BrowserTracing = /** @class */ (function () {\n function BrowserTracing(_options) {\n /**\n * @inheritDoc\n */\n this.name = BrowserTracing.id;\n this._emitOptionsWarning = false;\n /** Store configured idle timeout so that it can be added as a tag to transactions */\n this._configuredIdleTimeout = undefined;\n var tracingOrigins = defaultRequestInstrumentationOptions.tracingOrigins;\n // NOTE: Logger doesn't work in constructors, as it's initialized after integrations instances\n if (_options) {\n this._configuredIdleTimeout = _options.idleTimeout;\n if (_options.tracingOrigins && Array.isArray(_options.tracingOrigins) && _options.tracingOrigins.length !== 0) {\n tracingOrigins = _options.tracingOrigins;\n }\n else {\n this._emitOptionsWarning = true;\n }\n }\n this.options = __assign(__assign(__assign({}, DEFAULT_BROWSER_TRACING_OPTIONS), _options), { tracingOrigins: tracingOrigins });\n var _metricOptions = this.options._metricOptions;\n this._metrics = new MetricsInstrumentation(_metricOptions && _metricOptions._reportAllChanges);\n }\n /**\n * @inheritDoc\n */\n BrowserTracing.prototype.setupOnce = function (_, getCurrentHub) {\n var _this = this;\n this._getCurrentHub = getCurrentHub;\n if (this._emitOptionsWarning) {\n logger.warn('[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace.');\n logger.warn(\"[Tracing] We added a reasonable default for you: \" + defaultRequestInstrumentationOptions.tracingOrigins);\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _a = this.options, instrumentRouting = _a.routingInstrumentation, startTransactionOnLocationChange = _a.startTransactionOnLocationChange, startTransactionOnPageLoad = _a.startTransactionOnPageLoad, markBackgroundTransactions = _a.markBackgroundTransactions, traceFetch = _a.traceFetch, traceXHR = _a.traceXHR, tracingOrigins = _a.tracingOrigins, shouldCreateSpanForRequest = _a.shouldCreateSpanForRequest;\n instrumentRouting(function (context) { return _this._createRouteTransaction(context); }, startTransactionOnPageLoad, startTransactionOnLocationChange);\n if (markBackgroundTransactions) {\n registerBackgroundTabDetection();\n }\n instrumentOutgoingRequests({ traceFetch: traceFetch, traceXHR: traceXHR, tracingOrigins: tracingOrigins, shouldCreateSpanForRequest: shouldCreateSpanForRequest });\n };\n /** Create routing idle transaction. */\n BrowserTracing.prototype._createRouteTransaction = function (context) {\n var _this = this;\n if (!this._getCurrentHub) {\n logger.warn(\"[Tracing] Did not create \" + context.op + \" transaction because _getCurrentHub is invalid.\");\n return undefined;\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _a = this.options, beforeNavigate = _a.beforeNavigate, idleTimeout = _a.idleTimeout, maxTransactionDuration = _a.maxTransactionDuration;\n var parentContextFromHeader = context.op === 'pageload' ? getHeaderContext() : undefined;\n var expandedContext = __assign(__assign(__assign({}, context), parentContextFromHeader), { trimEnd: true });\n var modifiedContext = typeof beforeNavigate === 'function' ? beforeNavigate(expandedContext) : expandedContext;\n // For backwards compatibility reasons, beforeNavigate can return undefined to \"drop\" the transaction (prevent it\n // from being sent to Sentry).\n var finalContext = modifiedContext === undefined ? __assign(__assign({}, expandedContext), { sampled: false }) : modifiedContext;\n if (finalContext.sampled === false) {\n logger.log(\"[Tracing] Will not send \" + finalContext.op + \" transaction because of beforeNavigate.\");\n }\n logger.log(\"[Tracing] Starting \" + finalContext.op + \" transaction on scope\");\n var hub = this._getCurrentHub();\n var location = getGlobalObject().location;\n var idleTransaction = startIdleTransaction(hub, finalContext, idleTimeout, true, { location: location });\n idleTransaction.registerBeforeFinishCallback(function (transaction, endTimestamp) {\n _this._metrics.addPerformanceEntries(transaction);\n adjustTransactionDuration(secToMs(maxTransactionDuration), transaction, endTimestamp);\n });\n idleTransaction.setTag('idleTimeout', this._configuredIdleTimeout);\n return idleTransaction;\n };\n /**\n * @inheritDoc\n */\n BrowserTracing.id = 'BrowserTracing';\n return BrowserTracing;\n}());\nexport { BrowserTracing };\n/**\n * Gets transaction context from a sentry-trace meta.\n *\n * @returns Transaction context data from the header or undefined if there's no header or the header is malformed\n */\nexport function getHeaderContext() {\n var header = getMetaContent('sentry-trace');\n if (header) {\n return extractTraceparentData(header);\n }\n return undefined;\n}\n/** Returns the value of a meta tag */\nexport function getMetaContent(metaName) {\n var el = getGlobalObject().document.querySelector(\"meta[name=\" + metaName + \"]\");\n return el ? el.getAttribute('content') : null;\n}\n/** Adjusts transaction value based on max transaction duration */\nfunction adjustTransactionDuration(maxDuration, transaction, endTimestamp) {\n var diff = endTimestamp - transaction.startTimestamp;\n var isOutdatedTransaction = endTimestamp && (diff > maxDuration || diff < 0);\n if (isOutdatedTransaction) {\n transaction.setStatus(SpanStatus.DeadlineExceeded);\n transaction.setTag('maxTransactionDurationExceeded', 'true');\n }\n}\n//# sourceMappingURL=browsertracing.js.map","import { addExtensionMethods } from './hubextensions';\nimport * as Integrations from './integrations';\nexport { Integrations };\n// This is already exported as part of `Integrations` above (and for the moment will remain so for\n// backwards compatibility), but that interferes with treeshaking, so we also export it separately\n// here.\n//\n// Previously we expected users to import tracing integrations like\n//\n// import { Integrations } from '@sentry/tracing';\n// const instance = new Integrations.BrowserTracing();\n//\n// This makes the integrations unable to be treeshaken though. To address this, we now have\n// this individual export. We now expect users to consume BrowserTracing like so:\n//\n// import { BrowserTracing } from '@sentry/tracing';\n// const instance = new BrowserTracing();\n//\n// For an example of of the new usage of BrowserTracing, see @sentry/nextjs index.client.ts\nexport { BrowserTracing } from './browser';\nexport { Span } from './span';\nexport { Transaction } from './transaction';\nexport { \n// TODO deprecate old name in v7\ninstrumentOutgoingRequests as registerRequestInstrumentation, defaultRequestInstrumentationOptions, } from './browser';\nexport { SpanStatus } from './spanstatus';\nexport { IdleTransaction } from './idletransaction';\nexport { startIdleTransaction } from './hubextensions';\n// We are patching the global object with our hub extension methods\naddExtensionMethods();\nexport { addExtensionMethods };\nexport { extractTraceparentData, getActiveTransaction, hasTracingEnabled, stripUrlQueryAndFragment, TRACEPARENT_REGEXP, } from './utils';\n//# sourceMappingURL=index.js.map","export var TransactionSamplingMethod;\n(function (TransactionSamplingMethod) {\n TransactionSamplingMethod[\"Explicit\"] = \"explicitly_set\";\n TransactionSamplingMethod[\"Sampler\"] = \"client_sampler\";\n TransactionSamplingMethod[\"Rate\"] = \"client_rate\";\n TransactionSamplingMethod[\"Inheritance\"] = \"inheritance\";\n})(TransactionSamplingMethod || (TransactionSamplingMethod = {}));\n//# sourceMappingURL=transaction.js.map","import { __assign } from \"tslib\";\nimport { getGlobalObject } from '@sentry/utils';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport * as React from 'react';\n/* eslint-enable @typescript-eslint/no-explicit-any */\nvar global = getGlobalObject();\nvar activeTransaction;\nexport function reactRouterV4Instrumentation(history, routes, matchPath) {\n return createReactRouterInstrumentation(history, 'react-router-v4', routes, matchPath);\n}\nexport function reactRouterV5Instrumentation(history, routes, matchPath) {\n return createReactRouterInstrumentation(history, 'react-router-v5', routes, matchPath);\n}\nfunction createReactRouterInstrumentation(history, name, allRoutes, matchPath) {\n if (allRoutes === void 0) { allRoutes = []; }\n function getInitPathName() {\n if (history && history.location) {\n return history.location.pathname;\n }\n if (global && global.location) {\n return global.location.pathname;\n }\n return undefined;\n }\n function getTransactionName(pathname) {\n if (allRoutes.length === 0 || !matchPath) {\n return pathname;\n }\n var branches = matchRoutes(allRoutes, pathname, matchPath);\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (var x = 0; x < branches.length; x++) {\n if (branches[x].match.isExact) {\n return branches[x].match.path;\n }\n }\n return pathname;\n }\n return function (customStartTransaction, startTransactionOnPageLoad, startTransactionOnLocationChange) {\n if (startTransactionOnPageLoad === void 0) { startTransactionOnPageLoad = true; }\n if (startTransactionOnLocationChange === void 0) { startTransactionOnLocationChange = true; }\n var initPathName = getInitPathName();\n if (startTransactionOnPageLoad && initPathName) {\n activeTransaction = customStartTransaction({\n name: getTransactionName(initPathName),\n op: 'pageload',\n tags: {\n 'routing.instrumentation': name,\n },\n });\n }\n if (startTransactionOnLocationChange && history.listen) {\n history.listen(function (location, action) {\n if (action && (action === 'PUSH' || action === 'POP')) {\n if (activeTransaction) {\n activeTransaction.finish();\n }\n var tags = {\n 'routing.instrumentation': name,\n };\n activeTransaction = customStartTransaction({\n name: getTransactionName(location.pathname),\n op: 'navigation',\n tags: tags,\n });\n }\n });\n }\n };\n}\n/**\n * Matches a set of routes to a pathname\n * Based on implementation from\n */\nfunction matchRoutes(routes, pathname, matchPath, branch) {\n if (branch === void 0) { branch = []; }\n routes.some(function (route) {\n var match = route.path\n ? matchPath(pathname, route)\n : branch.length\n ? branch[branch.length - 1].match // use parent match\n : computeRootMatch(pathname); // use default \"root\" match\n if (match) {\n branch.push({ route: route, match: match });\n if (route.routes) {\n matchRoutes(route.routes, pathname, matchPath, branch);\n }\n }\n return !!match;\n });\n return branch;\n}\nfunction computeRootMatch(pathname) {\n return { path: '/', url: '/', params: {}, isExact: pathname === '/' };\n}\n/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\nexport function withSentryRouting(Route) {\n var componentDisplayName = Route.displayName || Route.name;\n var WrappedRoute = function (props) {\n if (activeTransaction && props && props.computedMatch && props.computedMatch.isExact) {\n activeTransaction.setName(props.computedMatch.path);\n }\n // @ts-ignore Setting more specific React Component typing for `R` generic above\n // will break advanced type inference done by react router params:\n // https://github.com/DefinitelyTyped/DefinitelyTyped/blob/13dc4235c069e25fe7ee16e11f529d909f9f3ff8/types/react-router/index.d.ts#L154-L164\n return React.createElement(Route, __assign({}, props));\n };\n WrappedRoute.displayName = \"sentryRoute(\" + componentDisplayName + \")\";\n hoistNonReactStatics(WrappedRoute, Route);\n // @ts-ignore Setting more specific React Component typing for `R` generic above\n // will break advanced type inference done by react router params:\n // https://github.com/DefinitelyTyped/DefinitelyTyped/blob/13dc4235c069e25fe7ee16e11f529d909f9f3ff8/types/react-router/index.d.ts#L154-L164\n return WrappedRoute;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n//# sourceMappingURL=reactrouter.js.map","// TODO: Remove in the next major release and rely only on @sentry/core SDK_VERSION and SdkInfo metadata\nexport var SDK_NAME = 'sentry.javascript.browser';\n//# sourceMappingURL=version.js.map","import { __assign } from \"tslib\";\nexport * from './exports';\nimport { Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\nimport * as BrowserIntegrations from './integrations';\nimport * as Transports from './transports';\nvar windowIntegrations = {};\n// This block is needed to add compatibility with the integrations packages when used with a CDN\nvar _window = getGlobalObject();\nif (_window.Sentry && _window.Sentry.Integrations) {\n windowIntegrations = _window.Sentry.Integrations;\n}\nvar INTEGRATIONS = __assign(__assign(__assign({}, windowIntegrations), CoreIntegrations), BrowserIntegrations);\nexport { INTEGRATIONS as Integrations, Transports };\n//# sourceMappingURL=index.js.map","import { Dsn, urlEncode } from '@sentry/utils';\nvar SENTRY_API_VERSION = '7';\n/**\n * Helper class to provide urls, headers and metadata that can be used to form\n * different types of requests to Sentry endpoints.\n * Supports both envelopes and regular event requests.\n **/\nvar API = /** @class */ (function () {\n /** Create a new instance of API */\n function API(dsn, metadata, tunnel) {\n if (metadata === void 0) { metadata = {}; }\n this.dsn = dsn;\n this._dsnObject = new Dsn(dsn);\n this.metadata = metadata;\n this._tunnel = tunnel;\n }\n /** Returns the Dsn object. */\n API.prototype.getDsn = function () {\n return this._dsnObject;\n };\n /** Does this transport force envelopes? */\n API.prototype.forceEnvelope = function () {\n return !!this._tunnel;\n };\n /** Returns the prefix to construct Sentry ingestion API endpoints. */\n API.prototype.getBaseApiEndpoint = function () {\n var dsn = this.getDsn();\n var protocol = dsn.protocol ? dsn.protocol + \":\" : '';\n var port = dsn.port ? \":\" + dsn.port : '';\n return protocol + \"//\" + dsn.host + port + (dsn.path ? \"/\" + dsn.path : '') + \"/api/\";\n };\n /** Returns the store endpoint URL. */\n API.prototype.getStoreEndpoint = function () {\n return this._getIngestEndpoint('store');\n };\n /**\n * Returns the store endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n API.prototype.getStoreEndpointWithUrlEncodedAuth = function () {\n return this.getStoreEndpoint() + \"?\" + this._encodedAuth();\n };\n /**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n API.prototype.getEnvelopeEndpointWithUrlEncodedAuth = function () {\n if (this.forceEnvelope()) {\n return this._tunnel;\n }\n return this._getEnvelopeEndpoint() + \"?\" + this._encodedAuth();\n };\n /** Returns only the path component for the store endpoint. */\n API.prototype.getStoreEndpointPath = function () {\n var dsn = this.getDsn();\n return (dsn.path ? \"/\" + dsn.path : '') + \"/api/\" + dsn.projectId + \"/store/\";\n };\n /**\n * Returns an object that can be used in request headers.\n * This is needed for node and the old /store endpoint in sentry\n */\n API.prototype.getRequestHeaders = function (clientName, clientVersion) {\n // CHANGE THIS to use metadata but keep clientName and clientVersion compatible\n var dsn = this.getDsn();\n var header = [\"Sentry sentry_version=\" + SENTRY_API_VERSION];\n header.push(\"sentry_client=\" + clientName + \"/\" + clientVersion);\n header.push(\"sentry_key=\" + dsn.publicKey);\n if (dsn.pass) {\n header.push(\"sentry_secret=\" + dsn.pass);\n }\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', '),\n };\n };\n /** Returns the url to the report dialog endpoint. */\n API.prototype.getReportDialogEndpoint = function (dialogOptions) {\n if (dialogOptions === void 0) { dialogOptions = {}; }\n var dsn = this.getDsn();\n var endpoint = this.getBaseApiEndpoint() + \"embed/error-page/\";\n var encodedOptions = [];\n encodedOptions.push(\"dsn=\" + dsn.toString());\n for (var key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions.push(\"name=\" + encodeURIComponent(dialogOptions.user.name));\n }\n if (dialogOptions.user.email) {\n encodedOptions.push(\"email=\" + encodeURIComponent(dialogOptions.user.email));\n }\n }\n else {\n encodedOptions.push(encodeURIComponent(key) + \"=\" + encodeURIComponent(dialogOptions[key]));\n }\n }\n if (encodedOptions.length) {\n return endpoint + \"?\" + encodedOptions.join('&');\n }\n return endpoint;\n };\n /** Returns the envelope endpoint URL. */\n API.prototype._getEnvelopeEndpoint = function () {\n return this._getIngestEndpoint('envelope');\n };\n /** Returns the ingest API endpoint for target. */\n API.prototype._getIngestEndpoint = function (target) {\n if (this._tunnel) {\n return this._tunnel;\n }\n var base = this.getBaseApiEndpoint();\n var dsn = this.getDsn();\n return \"\" + base + dsn.projectId + \"/\" + target + \"/\";\n };\n /** Returns a URL-encoded string with auth config suitable for a query string. */\n API.prototype._encodedAuth = function () {\n var dsn = this.getDsn();\n var auth = {\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n };\n return urlEncode(auth);\n };\n return API;\n}());\nexport { API };\n//# sourceMappingURL=api.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { getCurrentHub } from '@sentry/hub';\n/**\n * This calls a function on the current hub.\n * @param method function to call on hub.\n * @param args to pass to function.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction callOnHub(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var hub = getCurrentHub();\n if (hub && hub[method]) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return hub[method].apply(hub, __spread(args));\n }\n throw new Error(\"No hub defined or \" + method + \" was not found on the hub, please open a bug report.\");\n}\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @returns The generated eventId.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function captureException(exception, captureContext) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n captureContext: captureContext,\n originalException: exception,\n syntheticException: syntheticException,\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 level Define the level of the message.\n * @returns The generated eventId.\n */\nexport function captureMessage(message, captureContext) {\n var syntheticException;\n try {\n throw new Error(message);\n }\n catch (exception) {\n syntheticException = exception;\n }\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n var level = typeof captureContext === 'string' ? captureContext : undefined;\n var context = typeof captureContext !== 'string' ? { captureContext: captureContext } : undefined;\n return callOnHub('captureMessage', message, level, __assign({ originalException: message, syntheticException: syntheticException }, context));\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 */\nexport function captureEvent(event) {\n return callOnHub('captureEvent', event);\n}\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nexport function configureScope(callback) {\n callOnHub('configureScope', callback);\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 */\nexport function addBreadcrumb(breadcrumb) {\n callOnHub('addBreadcrumb', breadcrumb);\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\nexport function setContext(name, context) {\n callOnHub('setContext', name, context);\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 */\nexport function setExtras(extras) {\n callOnHub('setExtras', extras);\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 */\nexport function setTags(tags) {\n callOnHub('setTags', tags);\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 */\nexport function setExtra(key, extra) {\n callOnHub('setExtra', key, extra);\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 */\nexport function setTag(key, value) {\n callOnHub('setTag', key, value);\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 */\nexport function setUser(user) {\n callOnHub('setUser', user);\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 */\nexport function withScope(callback) {\n callOnHub('withScope', callback);\n}\n/**\n * Calls a function on the latest client. Use this with caution, it's meant as\n * in \"internal\" helper so we don't need to expose every possible function in\n * the shim. It is not guaranteed that the client actually implements the\n * function.\n *\n * @param method The method to call on the client/client.\n * @param args Arguments to pass to the client/fontend.\n * @hidden\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function _callOnClient(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n callOnHub.apply(void 0, __spread(['_invokeClient', method], args));\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 * @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 */\nexport function startTransaction(context, customSamplingContext) {\n return callOnHub('startTransaction', __assign({}, context), customSamplingContext);\n}\n//# sourceMappingURL=index.js.map","export { GlobalHandlers } from './globalhandlers';\nexport { TryCatch } from './trycatch';\nexport { Breadcrumbs } from './breadcrumbs';\nexport { LinkedErrors } from './linkederrors';\nexport { UserAgent } from './useragent';\nexport { Dedupe } from './dedupe';\n//# sourceMappingURL=index.js.map","export var REACT_RENDER_OP = 'ui.react.render';\nexport var REACT_UPDATE_OP = 'ui.react.update';\nexport var REACT_MOUNT_OP = 'ui.react.mount';\n//# sourceMappingURL=constants.js.map","import { __assign, __extends, __read } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { getCurrentHub } from '@sentry/browser';\nimport { timestampWithMs } from '@sentry/utils';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport * as React from 'react';\nimport { REACT_MOUNT_OP, REACT_RENDER_OP, REACT_UPDATE_OP } from './constants';\nexport var UNKNOWN_COMPONENT = 'unknown';\nvar TRACING_GETTER = {\n id: 'Tracing',\n};\nvar globalTracingIntegration = null;\n/** @deprecated remove when @sentry/apm no longer used */\nvar getTracingIntegration = function () {\n if (globalTracingIntegration) {\n return globalTracingIntegration;\n }\n globalTracingIntegration = getCurrentHub().getIntegration(TRACING_GETTER);\n return globalTracingIntegration;\n};\n/**\n * pushActivity creates an new react activity.\n * Is a no-op if Tracing integration is not valid\n * @param name displayName of component that started activity\n * @deprecated remove when @sentry/apm no longer used\n */\nfunction pushActivity(name, op) {\n if (globalTracingIntegration === null) {\n return null;\n }\n return globalTracingIntegration.constructor.pushActivity(name, {\n description: \"<\" + name + \">\",\n op: op,\n });\n}\n/**\n * popActivity removes a React activity.\n * Is a no-op if Tracing integration is not valid.\n * @param activity id of activity that is being popped\n * @deprecated remove when @sentry/apm no longer used\n */\nfunction popActivity(activity) {\n if (activity === null || globalTracingIntegration === null) {\n return;\n }\n globalTracingIntegration.constructor.popActivity(activity);\n}\n/**\n * Obtain a span given an activity id.\n * Is a no-op if Tracing integration is not valid.\n * @param activity activity id associated with obtained span\n * @deprecated remove when @sentry/apm no longer used\n */\nfunction getActivitySpan(activity) {\n if (activity === null || globalTracingIntegration === null) {\n return undefined;\n }\n return globalTracingIntegration.constructor.getActivitySpan(activity);\n}\n/**\n * The Profiler component leverages Sentry's Tracing integration to generate\n * spans based on component lifecycles.\n */\nvar Profiler = /** @class */ (function (_super) {\n __extends(Profiler, _super);\n function Profiler(props) {\n var _this = _super.call(this, props) || this;\n /**\n * The span of the mount activity\n * Made protected for the React Native SDK to access\n */\n _this._mountSpan = undefined;\n // The activity representing how long it takes to mount a component.\n _this._mountActivity = null;\n var _a = _this.props, name = _a.name, _b = _a.disabled, disabled = _b === void 0 ? false : _b;\n if (disabled) {\n return _this;\n }\n // If they are using @sentry/apm, we need to push/pop activities\n // eslint-disable-next-line deprecation/deprecation\n if (getTracingIntegration()) {\n // eslint-disable-next-line deprecation/deprecation\n _this._mountActivity = pushActivity(name, REACT_MOUNT_OP);\n }\n else {\n var activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n _this._mountSpan = activeTransaction.startChild({\n description: \"<\" + name + \">\",\n op: REACT_MOUNT_OP,\n });\n }\n }\n return _this;\n }\n // If a component mounted, we can finish the mount activity.\n Profiler.prototype.componentDidMount = function () {\n if (this._mountSpan) {\n this._mountSpan.finish();\n }\n else {\n // eslint-disable-next-line deprecation/deprecation\n this._mountSpan = getActivitySpan(this._mountActivity);\n // eslint-disable-next-line deprecation/deprecation\n popActivity(this._mountActivity);\n this._mountActivity = null;\n }\n };\n Profiler.prototype.componentDidUpdate = function (_a) {\n var _this = this;\n var updateProps = _a.updateProps, _b = _a.includeUpdates, includeUpdates = _b === void 0 ? true : _b;\n // Only generate an update span if hasUpdateSpan is true, if there is a valid mountSpan,\n // and if the updateProps have changed. It is ok to not do a deep equality check here as it is expensive.\n // We are just trying to give baseline clues for further investigation.\n if (includeUpdates && this._mountSpan && updateProps !== this.props.updateProps) {\n // See what props haved changed between the previous props, and the current props. This is\n // set as data on the span. We just store the prop keys as the values could be potenially very large.\n var changedProps = Object.keys(updateProps).filter(function (k) { return updateProps[k] !== _this.props.updateProps[k]; });\n if (changedProps.length > 0) {\n // The update span is a point in time span with 0 duration, just signifying that the component\n // has been updated.\n var now = timestampWithMs();\n this._mountSpan.startChild({\n data: {\n changedProps: changedProps,\n },\n description: \"<\" + this.props.name + \">\",\n endTimestamp: now,\n op: REACT_UPDATE_OP,\n startTimestamp: now,\n });\n }\n }\n };\n // If a component is unmounted, we can say it is no longer on the screen.\n // This means we can finish the span representing the component render.\n Profiler.prototype.componentWillUnmount = function () {\n var _a = this.props, name = _a.name, _b = _a.includeRender, includeRender = _b === void 0 ? true : _b;\n if (this._mountSpan && includeRender) {\n // If we were able to obtain the spanId of the mount activity, we should set the\n // next activity as a child to the component mount activity.\n this._mountSpan.startChild({\n description: \"<\" + name + \">\",\n endTimestamp: timestampWithMs(),\n op: REACT_RENDER_OP,\n startTimestamp: this._mountSpan.endTimestamp,\n });\n }\n };\n Profiler.prototype.render = function () {\n return this.props.children;\n };\n // eslint-disable-next-line @typescript-eslint/member-ordering\n Profiler.defaultProps = {\n disabled: false,\n includeRender: true,\n includeUpdates: true,\n };\n return Profiler;\n}(React.Component));\n/**\n * withProfiler is a higher order component that wraps a\n * component in a {@link Profiler} component. It is recommended that\n * the higher order component be used over the regular {@link Profiler} component.\n *\n * @param WrappedComponent component that is wrapped by Profiler\n * @param options the {@link ProfilerProps} you can pass into the Profiler\n */\nfunction withProfiler(WrappedComponent, \n// We do not want to have `updateProps` given in options, it is instead filled through the HOC.\noptions) {\n var componentDisplayName = (options && options.name) || WrappedComponent.displayName || WrappedComponent.name || UNKNOWN_COMPONENT;\n var Wrapped = function (props) { return (React.createElement(Profiler, __assign({}, options, { name: componentDisplayName, updateProps: props }),\n React.createElement(WrappedComponent, __assign({}, props)))); };\n Wrapped.displayName = \"profiler(\" + componentDisplayName + \")\";\n // Copy over static methods from Wrapped component to Profiler HOC\n // See: https://reactjs.org/docs/higher-order-components.html#static-methods-must-be-copied-over\n hoistNonReactStatics(Wrapped, WrappedComponent);\n return Wrapped;\n}\n/**\n *\n * `useProfiler` is a React hook that profiles a React component.\n *\n * Requires React 16.8 or above.\n * @param name displayName of component being profiled\n */\nfunction useProfiler(name, options) {\n if (options === void 0) { options = {\n disabled: false,\n hasRenderSpan: true,\n }; }\n var _a = __read(React.useState(function () {\n if (options && options.disabled) {\n return undefined;\n }\n var activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n return activeTransaction.startChild({\n description: \"<\" + name + \">\",\n op: REACT_MOUNT_OP,\n });\n }\n return undefined;\n }), 1), mountSpan = _a[0];\n React.useEffect(function () {\n if (mountSpan) {\n mountSpan.finish();\n }\n return function () {\n if (mountSpan && options.hasRenderSpan) {\n mountSpan.startChild({\n description: \"<\" + name + \">\",\n endTimestamp: timestampWithMs(),\n op: REACT_RENDER_OP,\n startTimestamp: mountSpan.endTimestamp,\n });\n }\n };\n // We only want this to run once.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n}\nexport { withProfiler, Profiler, useProfiler };\n/** Grabs active transaction off scope */\nexport function getActiveTransaction(hub) {\n if (hub === void 0) { hub = getCurrentHub(); }\n if (hub) {\n var scope = hub.getScope();\n if (scope) {\n return scope.getTransaction();\n }\n }\n return undefined;\n}\n//# sourceMappingURL=profiler.js.map","import { getGlobalObject } from '@sentry/utils';\nvar global = getGlobalObject();\n/**\n * Creates routing instrumentation for React Router v3\n * Works for React Router >= 3.2.0 and < 4.0.0\n *\n * @param history object from the `history` library\n * @param routes a list of all routes, should be\n * @param match `Router.match` utility\n */\nexport function reactRouterV3Instrumentation(history, routes, match) {\n return function (startTransaction, startTransactionOnPageLoad, startTransactionOnLocationChange) {\n if (startTransactionOnPageLoad === void 0) { startTransactionOnPageLoad = true; }\n if (startTransactionOnLocationChange === void 0) { startTransactionOnLocationChange = true; }\n var activeTransaction;\n var prevName;\n // Have to use global.location because history.location might not be defined.\n if (startTransactionOnPageLoad && global && global.location) {\n normalizeTransactionName(routes, global.location, match, function (localName) {\n prevName = localName;\n activeTransaction = startTransaction({\n name: prevName,\n op: 'pageload',\n tags: {\n 'routing.instrumentation': 'react-router-v3',\n },\n });\n });\n }\n if (startTransactionOnLocationChange && history.listen) {\n history.listen(function (location) {\n if (location.action === 'PUSH' || location.action === 'POP') {\n if (activeTransaction) {\n activeTransaction.finish();\n }\n var tags_1 = {\n 'routing.instrumentation': 'react-router-v3',\n };\n if (prevName) {\n tags_1.from = prevName;\n }\n normalizeTransactionName(routes, location, match, function (localName) {\n prevName = localName;\n activeTransaction = startTransaction({\n name: prevName,\n op: 'navigation',\n tags: tags_1,\n });\n });\n }\n });\n }\n };\n}\n/**\n * Normalize transaction names using `Router.match`\n */\nfunction normalizeTransactionName(appRoutes, location, match, callback) {\n var name = location.pathname;\n match({\n location: location,\n routes: appRoutes,\n }, function (error, _redirectLocation, renderProps) {\n if (error || !renderProps) {\n return callback(name);\n }\n var routePath = getRouteStringFromRoutes(renderProps.routes || []);\n if (routePath.length === 0 || routePath === '/*') {\n return callback(name);\n }\n name = routePath;\n return callback(name);\n });\n}\n/**\n * Generate route name from array of routes\n */\nfunction getRouteStringFromRoutes(routes) {\n if (!Array.isArray(routes) || routes.length === 0) {\n return '';\n }\n var routesWithPaths = routes.filter(function (route) { return !!route.path; });\n var index = -1;\n for (var x = routesWithPaths.length - 1; x >= 0; x--) {\n var route = routesWithPaths[x];\n if (route.path && route.path.startsWith('/')) {\n index = x;\n break;\n }\n }\n return routesWithPaths\n .slice(index)\n .filter(function (_a) {\n var path = _a.path;\n return !!path;\n })\n .map(function (_a) {\n var path = _a.path;\n return path;\n })\n .join('');\n}\n//# sourceMappingURL=reactrouterv3.js.map","/**\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 * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv() {\n return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';\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\nexport function dynamicRequire(mod, request) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\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 */\nexport function loadModule(moduleName) {\n var mod;\n try {\n mod = dynamicRequire(module, moduleName);\n }\n catch (e) {\n // no-empty\n }\n try {\n var cwd = dynamicRequire(module, 'process').cwd;\n mod = dynamicRequire(module, cwd() + \"/node_modules/\" + moduleName);\n }\n catch (e) {\n // no-empty\n }\n return mod;\n}\n//# sourceMappingURL=node.js.map","import { __assign, __values } from \"tslib\";\nimport { getGlobalObject } from './global';\nimport { isInstanceOf, isString } from './is';\nimport { logger } from './logger';\nimport { fill } from './object';\nimport { getFunctionName } from './stacktrace';\nimport { supportsHistory, supportsNativeFetch } from './supports';\nvar global = getGlobalObject();\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\nvar handlers = {};\nvar instrumented = {};\n/** Instruments given API */\nfunction instrument(type) {\n if (instrumented[type]) {\n return;\n }\n instrumented[type] = true;\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n logger.warn('unknown instrumentation type:', type);\n }\n}\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(handler) {\n if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') {\n return;\n }\n handlers[handler.type] = handlers[handler.type] || [];\n handlers[handler.type].push(handler.callback);\n instrument(handler.type);\n}\n/** JSDoc */\nfunction triggerHandlers(type, data) {\n var e_1, _a;\n if (!type || !handlers[type]) {\n return;\n }\n try {\n for (var _b = __values(handlers[type] || []), _c = _b.next(); !_c.done; _c = _b.next()) {\n var handler = _c.value;\n try {\n handler(data);\n }\n catch (e) {\n logger.error(\"Error while triggering instrumentation handler.\\nType: \" + type + \"\\nName: \" + getFunctionName(handler) + \"\\nError: \" + e);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n}\n/** JSDoc */\nfunction instrumentConsole() {\n if (!('console' in global)) {\n return;\n }\n ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function (level) {\n if (!(level in global.console)) {\n return;\n }\n fill(global.console, level, function (originalConsoleLevel) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n triggerHandlers('console', { args: args, level: level });\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n Function.prototype.apply.call(originalConsoleLevel, global.console, args);\n }\n };\n });\n });\n}\n/** JSDoc */\nfunction instrumentFetch() {\n if (!supportsNativeFetch()) {\n return;\n }\n fill(global, 'fetch', function (originalFetch) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var handlerData = {\n args: args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n triggerHandlers('fetch', __assign({}, handlerData));\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(global, args).then(function (response) {\n triggerHandlers('fetch', __assign(__assign({}, handlerData), { endTimestamp: Date.now(), response: response }));\n return response;\n }, function (error) {\n triggerHandlers('fetch', __assign(__assign({}, handlerData), { endTimestamp: Date.now(), error: error }));\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n });\n };\n });\n}\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs) {\n if (fetchArgs === void 0) { fetchArgs = []; }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs) {\n if (fetchArgs === void 0) { fetchArgs = []; }\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n/* eslint-enable @typescript-eslint/no-unsafe-member-access */\n/** JSDoc */\nfunction instrumentXHR() {\n if (!('XMLHttpRequest' in global)) {\n return;\n }\n // Poor man's implementation of ES6 `Map`, tracking and keeping in sync key and value separately.\n var requestKeys = [];\n var requestValues = [];\n var xhrproto = XMLHttpRequest.prototype;\n fill(xhrproto, 'open', function (originalOpen) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var xhr = this;\n var url = args[1];\n xhr.__sentry_xhr__ = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n };\n // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isString(url) && xhr.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) {\n xhr.__sentry_own_request__ = true;\n }\n var onreadystatechangeHandler = function () {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n if (xhr.__sentry_xhr__) {\n xhr.__sentry_xhr__.status_code = xhr.status;\n }\n }\n catch (e) {\n /* do nothing */\n }\n try {\n var requestPos = requestKeys.indexOf(xhr);\n if (requestPos !== -1) {\n // Make sure to pop both key and value to keep it in sync.\n requestKeys.splice(requestPos);\n var args_1 = requestValues.splice(requestPos)[0];\n if (xhr.__sentry_xhr__ && args_1[0] !== undefined) {\n xhr.__sentry_xhr__.body = args_1[0];\n }\n }\n }\n catch (e) {\n /* do nothing */\n }\n triggerHandlers('xhr', {\n args: args,\n endTimestamp: Date.now(),\n startTimestamp: Date.now(),\n xhr: xhr,\n });\n }\n };\n if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {\n fill(xhr, 'onreadystatechange', function (original) {\n return function () {\n var readyStateArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n readyStateArgs[_i] = arguments[_i];\n }\n onreadystatechangeHandler();\n return original.apply(xhr, readyStateArgs);\n };\n });\n }\n else {\n xhr.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n return originalOpen.apply(xhr, args);\n };\n });\n fill(xhrproto, 'send', function (originalSend) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n requestKeys.push(this);\n requestValues.push(args);\n triggerHandlers('xhr', {\n args: args,\n startTimestamp: Date.now(),\n xhr: this,\n });\n return originalSend.apply(this, args);\n };\n });\n}\nvar lastHref;\n/** JSDoc */\nfunction instrumentHistory() {\n if (!supportsHistory()) {\n return;\n }\n var oldOnPopState = global.onpopstate;\n global.onpopstate = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var to = global.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n var from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from: from,\n to: to,\n });\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n }\n catch (_oO) {\n // no-empty\n }\n }\n };\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n var from = lastHref;\n var to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from: from,\n to: to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\nvar debounceDuration = 1000;\nvar debounceTimerID;\nvar lastCapturedEvent;\n/**\n * Decide whether the current event should finish the debounce of previously captured one.\n * @param previous previously captured event\n * @param current event to be captured\n */\nfunction shouldShortcircuitPreviousDebounce(previous, current) {\n // If there was no previous event, it should always be swapped for the new one.\n if (!previous) {\n return true;\n }\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (previous.type !== current.type) {\n return true;\n }\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (previous.target !== current.target) {\n return true;\n }\n }\n catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return false;\n}\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(event) {\n // We are only interested in filtering `keypress` events for now.\n if (event.type !== 'keypress') {\n return false;\n }\n try {\n var target = event.target;\n if (!target || !target.tagName) {\n return true;\n }\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n }\n catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n return true;\n}\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param handler function that will be triggered\n * @param globalListener indicates whether event was captured by the global event listener\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction makeDOMEventHandler(handler, globalListener) {\n if (globalListener === void 0) { globalListener = false; }\n return function (event) {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event)) {\n return;\n }\n var name = event.type === 'keypress' ? 'input' : event.type;\n // If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons.\n if (debounceTimerID === undefined) {\n handler({\n event: event,\n name: name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n // If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) {\n handler({\n event: event,\n name: name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = global.setTimeout(function () {\n debounceTimerID = undefined;\n }, debounceDuration);\n };\n}\n/** JSDoc */\nfunction instrumentDOM() {\n if (!('document' in global)) {\n return;\n }\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n var triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n var globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n global.document.addEventListener('click', globalDOMEventHandler, false);\n global.document.addEventListener('keypress', globalDOMEventHandler, false);\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach(function (target) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var proto = global[target] && global[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n fill(proto, 'addEventListener', function (originalAddEventListener) {\n return function (type, listener, options) {\n if (type === 'click' || type == 'keypress') {\n try {\n var el = this;\n var handlers_1 = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});\n var handlerForType = (handlers_1[type] = handlers_1[type] || { refCount: 0 });\n if (!handlerForType.handler) {\n var handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n handlerForType.refCount += 1;\n }\n catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n fill(proto, 'removeEventListener', function (originalRemoveEventListener) {\n return function (type, listener, options) {\n if (type === 'click' || type == 'keypress') {\n try {\n var el = this;\n var handlers_2 = el.__sentry_instrumentation_handlers__ || {};\n var handlerForType = handlers_2[type];\n if (handlerForType) {\n handlerForType.refCount -= 1;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers_2[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers_2).length === 0) {\n delete el.__sentry_instrumentation_handlers__;\n }\n }\n }\n catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n });\n });\n}\nvar _oldOnErrorHandler = null;\n/** JSDoc */\nfunction instrumentError() {\n _oldOnErrorHandler = global.onerror;\n global.onerror = function (msg, url, line, column, error) {\n triggerHandlers('error', {\n column: column,\n error: error,\n line: line,\n msg: msg,\n url: url,\n });\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n return false;\n };\n}\nvar _oldOnUnhandledRejectionHandler = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n global.onunhandledrejection = function (e) {\n triggerHandlers('unhandledrejection', e);\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n return true;\n };\n}\n//# sourceMappingURL=instrument.js.map","export var SDK_VERSION = '6.16.1';\n//# sourceMappingURL=version.js.map","var defaultFunctionName = '';\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n }\n catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n//# sourceMappingURL=stacktrace.js.map","import { isRegExp, isString } from './is';\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 */\nexport function truncate(str, max) {\n if (max === void 0) { max = 0; }\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : str.substr(0, max) + \"...\";\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 */\nexport function snipLine(line, colno) {\n var newLine = line;\n var ll = newLine.length;\n if (ll <= 150) {\n return newLine;\n }\n if (colno > ll) {\n // eslint-disable-next-line no-param-reassign\n colno = ll;\n }\n var start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n var end = Math.min(start + 140, ll);\n if (end > ll - 5) {\n end = ll;\n }\n if (end === ll) {\n start = Math.max(end - 140, 0);\n }\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = \"'{snip} \" + newLine;\n }\n if (end < ll) {\n newLine += ' {snip}';\n }\n return newLine;\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\nexport function safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n var output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (var i = 0; i < input.length; i++) {\n var value = input[i];\n try {\n output.push(String(value));\n }\n catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n return output.join(delimiter);\n}\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\nexport function isMatchingPattern(value, pattern) {\n if (!isString(value)) {\n return false;\n }\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}\n/**\n * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to\n * `new RegExp()`.\n *\n * Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime\n * type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node\n * 12+).\n *\n * @param regexString The string to escape\n * @returns An version of the string with all special regex characters escaped\n */\nexport function escapeStringForRegex(regexString) {\n // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems\n // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.\n return regexString.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n}\n//# sourceMappingURL=string.js.map","export { BaseTransport } from './base';\nexport { FetchTransport } from './fetch';\nexport { XHRTransport } from './xhr';\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\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 */\nexport function isError(wat) {\n switch (Object.prototype.toString.call(wat)) {\n case '[object Error]':\n return true;\n case '[object Exception]':\n return true;\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\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 */\nexport function isErrorEvent(wat) {\n return Object.prototype.toString.call(wat) === '[object ErrorEvent]';\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 */\nexport function isDOMError(wat) {\n return Object.prototype.toString.call(wat) === '[object DOMError]';\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 */\nexport function isDOMException(wat) {\n return Object.prototype.toString.call(wat) === '[object DOMException]';\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 */\nexport function isString(wat) {\n return Object.prototype.toString.call(wat) === '[object String]';\n}\n/**\n * Checks whether given value's 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 */\nexport function isPrimitive(wat) {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\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 */\nexport function isPlainObject(wat) {\n return Object.prototype.toString.call(wat) === '[object Object]';\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 */\nexport function isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\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 */\nexport function isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\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 */\nexport function isRegExp(wat) {\n return Object.prototype.toString.call(wat) === '[object RegExp]';\n}\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function 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 * 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 */\nexport function isSyntheticEvent(wat) {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\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 */\nexport function isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n }\n catch (_e) {\n return false;\n }\n}\n//# sourceMappingURL=is.js.map","import { __assign, __extends } from \"tslib\";\nimport { captureException, showReportDialog, withScope } from '@sentry/browser';\nimport { logger, parseSemver } from '@sentry/utils';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport * as React from 'react';\nvar reactVersion = parseSemver(React.version);\nexport var UNKNOWN_COMPONENT = 'unknown';\nvar INITIAL_STATE = {\n componentStack: null,\n error: null,\n eventId: null,\n};\n/**\n * A ErrorBoundary component that logs errors to Sentry. Requires React >= 16.\n * NOTE: If you are a Sentry user, and you are seeing this stack frame, it means the\n * Sentry React SDK ErrorBoundary caught an error invoking your application code. This\n * is expected behavior and NOT indicative of a bug with the Sentry React SDK.\n */\nvar ErrorBoundary = /** @class */ (function (_super) {\n __extends(ErrorBoundary, _super);\n function ErrorBoundary() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = INITIAL_STATE;\n _this.resetErrorBoundary = function () {\n var onReset = _this.props.onReset;\n var _a = _this.state, error = _a.error, componentStack = _a.componentStack, eventId = _a.eventId;\n if (onReset) {\n onReset(error, componentStack, eventId);\n }\n _this.setState(INITIAL_STATE);\n };\n return _this;\n }\n ErrorBoundary.prototype.componentDidCatch = function (error, _a) {\n var _this = this;\n var componentStack = _a.componentStack;\n var _b = this.props, beforeCapture = _b.beforeCapture, onError = _b.onError, showDialog = _b.showDialog, dialogOptions = _b.dialogOptions;\n withScope(function (scope) {\n // If on React version >= 17, create stack trace from componentStack param and links\n // to to the original error using `error.cause` otherwise relies on error param for stacktrace.\n // Linking errors requires the `LinkedErrors` integration be enabled.\n if (reactVersion.major && reactVersion.major >= 17) {\n var errorBoundaryError = new Error(error.message);\n errorBoundaryError.name = \"React ErrorBoundary \" + errorBoundaryError.name;\n errorBoundaryError.stack = componentStack;\n // Using the `LinkedErrors` integration to link the errors together.\n error.cause = errorBoundaryError;\n }\n if (beforeCapture) {\n beforeCapture(scope, error, componentStack);\n }\n var eventId = captureException(error, { contexts: { react: { componentStack: componentStack } } });\n if (onError) {\n onError(error, componentStack, eventId);\n }\n if (showDialog) {\n showReportDialog(__assign(__assign({}, dialogOptions), { eventId: eventId }));\n }\n // componentDidCatch is used over getDerivedStateFromError\n // so that componentStack is accessible through state.\n _this.setState({ error: error, componentStack: componentStack, eventId: eventId });\n });\n };\n ErrorBoundary.prototype.componentDidMount = function () {\n var onMount = this.props.onMount;\n if (onMount) {\n onMount();\n }\n };\n ErrorBoundary.prototype.componentWillUnmount = function () {\n var _a = this.state, error = _a.error, componentStack = _a.componentStack, eventId = _a.eventId;\n var onUnmount = this.props.onUnmount;\n if (onUnmount) {\n onUnmount(error, componentStack, eventId);\n }\n };\n ErrorBoundary.prototype.render = function () {\n var _a = this.props, fallback = _a.fallback, children = _a.children;\n var _b = this.state, error = _b.error, componentStack = _b.componentStack, eventId = _b.eventId;\n if (error) {\n var element = undefined;\n if (typeof fallback === 'function') {\n element = fallback({ error: error, componentStack: componentStack, resetError: this.resetErrorBoundary, eventId: eventId });\n }\n else {\n element = fallback;\n }\n if (React.isValidElement(element)) {\n return element;\n }\n if (fallback) {\n logger.warn('fallback did not produce a valid ReactElement');\n }\n // Fail gracefully if no fallback provided or is not valid\n return null;\n }\n if (typeof children === 'function') {\n return children();\n }\n return children;\n };\n return ErrorBoundary;\n}(React.Component));\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction withErrorBoundary(WrappedComponent, errorBoundaryOptions) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var componentDisplayName = WrappedComponent.displayName || WrappedComponent.name || UNKNOWN_COMPONENT;\n var Wrapped = function (props) { return (React.createElement(ErrorBoundary, __assign({}, errorBoundaryOptions),\n React.createElement(WrappedComponent, __assign({}, props)))); };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n Wrapped.displayName = \"errorBoundary(\" + componentDisplayName + \")\";\n // Copy over static methods from Wrapped component to Profiler HOC\n // See: https://reactjs.org/docs/higher-order-components.html#static-methods-must-be-copied-over\n hoistNonReactStatics(Wrapped, WrappedComponent);\n return Wrapped;\n}\nexport { ErrorBoundary, withErrorBoundary };\n//# sourceMappingURL=errorboundary.js.map"],"sourceRoot":""}