// Metro module 1028 (f1029). import { GLOBAL_OBJ, getLocationHref, getOriginalFunction, withScope, addExceptionTypeValue, addExceptionMechanism, captureException, markFunctionWrapped, addNonEnumerableProperty } from "./Module817"; let c842_2, wrap; const ignoreNextOnError = function ignoreNextOnError() { c842_2 = c842_2 + 1; setTimeout(() => { c842_2 = c842_2 - 1; }); }; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); c842_2 = 0; export const WINDOW = GLOBAL_OBJ; export function getHttpRequestData() { const locationHref = getLocationHref(); const referrer = (GLOBAL_OBJ.document || {}).referrer; const userAgent = (GLOBAL_OBJ.navigator || {}).userAgent; return { url: locationHref, headers: { ...referrer && { Referer: referrer }, ...userAgent && { "User-Agent": userAgent } } }; } export { ignoreNextOnError }; export function shouldIgnoreOnError() { return c842_2 > 0; } wrap = function wrap(handleEvent) { let r58; let r1 = arguments[1]; if (r1 === void 0) { r1 = {}; } let c12664_1 = r1; if ((function isFunction(a0) { return typeof a0 === "function"; })(handleEvent)) { L25: { L22: { try { const __sentry_wrapped__ = handleEvent.__sentry_wrapped__; if (__sentry_wrapped__) { r58 = handleEvent; if (typeof __sentry_wrapped__ !== "function") { break L25; } r58 = __sentry_wrapped__; break L25; } if (getOriginalFunction(handleEvent)) { break L22; } } catch ($e) { return handleEvent; } const sentryWrapped = function sentryWrapped(...arguments2) { let r11; let c24017_1; try { r11 = handleEvent.apply(this, arguments2.map((item) => wrap(item, c12664_1))); } catch (r12) { c24017_1 = r12; ignoreNextOnError(); withScope((a0) => { a0.addEventProcessor((a0) => { if (c12664_1.mechanism) { addExceptionTypeValue(a0, void 0, void 0); addExceptionMechanism(a0, c12664_1.mechanism); } a0.extra = { ...a0.extra, arguments: arguments2 }; return a0; }); captureException(c24017_1); }); throw r12; } return r11; }; try { for (const key in handleEvent) { if (Object.prototype.hasOwnProperty.call(handleEvent, key)) { sentryWrapped[key] = handleEvent[key]; } } } catch ($e) {} markFunctionWrapped(sentryWrapped, handleEvent); addNonEnumerableProperty(handleEvent, "__sentry_wrapped__", sentryWrapped); try { if (Object.getOwnPropertyDescriptor(sentryWrapped, "name").configurable) { Object.defineProperty(sentryWrapped, "name", { get: () => handleEvent.name }); } } catch ($e) {} return sentryWrapped; } return handleEvent; } return r58; } return handleEvent; }; export { wrap };