decord/source/1105_mobileReplayIntegrationNoop.js

219 lines
8.4 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 1105
2026-07-25 08:10:48 +00:00
// Function ID: 12625
2026-07-20 16:05:17 +00:00
// Name: mobileReplayIntegrationNoop
2026-07-23 10:11:24 +00:00
// Dependencies: [978, 794, 977, 989, 1106, 1107]
2026-07-20 16:05:17 +00:00
// Module 1105 (mobileReplayIntegrationNoop)
2026-07-23 10:11:24 +00:00
const require = arg1;
let dependencyMap = arg6;
2026-07-20 16:05:17 +00:00
let fn = this;
if (this) {
fn = this.__awaiter;
}
if (!fn) {
fn = (arg0, arg1, arg2, arg3) => {
let _Promise = arg2;
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
let closure_1 = arg1;
2026-07-20 16:05:17 +00:00
let closure_3 = arg3;
if (!arg2) {
_Promise = Promise;
}
_Promise = new _Promise((arg0, arg1) => {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
let closure_1 = arg1;
2026-07-20 16:05:17 +00:00
function fulfilled(arg0) {
step(iter.next(arg0));
}
2026-07-23 10:11:24 +00:00
let iter = function rejected(arg0) {
2026-07-20 16:05:17 +00:00
step(iter.throw(arg0));
};
function step(iter) {
if (iter.done) {
2026-07-23 10:11:24 +00:00
callback(iter.value);
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
(function adopt(value) {
2026-07-20 16:05:17 +00:00
let tmp = value;
2026-07-23 10:11:24 +00:00
let closure_0 = value;
if (!(value instanceof fulfilled)) {
const prototype = fulfilled.prototype;
tmp = new fulfilled((arg0) => {
arg0(closure_0);
2026-07-20 16:05:17 +00:00
});
}
return tmp;
2026-07-23 10:11:24 +00:00
})(iter.value).then(fulfilled, iter);
const promise = (function adopt(value) {
2026-07-20 16:05:17 +00:00
let tmp = value;
2026-07-23 10:11:24 +00:00
let closure_0 = value;
if (!(value instanceof fulfilled)) {
const prototype = fulfilled.prototype;
tmp = new fulfilled((arg0) => {
arg0(closure_0);
2026-07-20 16:05:17 +00:00
});
}
return tmp;
2026-07-23 10:11:24 +00:00
})(iter.value);
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
let items = closure_1;
if (!closure_1) {
2026-07-20 16:05:17 +00:00
items = [];
}
2026-07-23 10:11:24 +00:00
iter = iter.apply(closure_0, items);
2026-07-20 16:05:17 +00:00
step(iter.next());
});
return _Promise;
};
}
2026-07-23 10:11:24 +00:00
const MobileReplay = "MobileReplay";
let closure_4 = { maskAllText: true, maskAllImages: true, maskAllVectors: true, enableExperimentalViewRenderer: false, enableViewRendererV2: true, enableFastViewRendering: false, screenshotStrategy: "pixelCopy" };
2026-07-20 16:05:17 +00:00
function mobileReplayIntegrationNoop() {
return {
2026-07-23 10:11:24 +00:00
name: MobileReplay,
2026-07-20 16:05:17 +00:00
options: closure_4,
getReplayId() {
return null;
}
};
}
arg5.MOBILE_REPLAY_INTEGRATION_NAME = "MobileReplay";
arg5.mobileReplayIntegration = function mobileReplayIntegration() {
function updateCachedReplayId(arg0, arg1, arg2, arg3) {
let closure_1 = arg0;
}
function getCachedReplayId() {
2026-07-23 10:11:24 +00:00
if (null !== currentReplayId) {
return currentReplayId;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
const NATIVE = first(_null[2]).NATIVE;
currentReplayId = NATIVE.getCurrentReplayId();
2026-07-20 16:05:17 +00:00
return currentReplayId;
}
}
if (arguments.length > 0) {
if (undefined !== arguments[0]) {
let first = arguments[0];
}
2026-07-23 10:11:24 +00:00
let obj = first(978);
2026-07-20 16:05:17 +00:00
if (obj.isExpoGo()) {
2026-07-23 10:11:24 +00:00
let debug = first(794).debug;
let _HermesInternal = HermesInternal;
2026-07-20 16:05:17 +00:00
debug.warn("[Sentry] " + getCachedReplayId + " is not supported in Expo Go. Use EAS Build or `expo prebuild` to enable it.");
}
if (obj2.notMobileOs()) {
2026-07-23 10:11:24 +00:00
let debug2 = first(794).debug;
let _HermesInternal2 = HermesInternal;
2026-07-20 16:05:17 +00:00
debug2.warn("[Sentry] " + getCachedReplayId + " is not supported on this platform.");
}
2026-07-23 10:11:24 +00:00
obj2 = first(978);
2026-07-20 16:05:17 +00:00
if (!obj3.isExpoGo()) {
if (!obj4.notMobileOs()) {
2026-07-23 10:11:24 +00:00
let _Object = Object;
let _Object2 = Object;
2026-07-20 16:05:17 +00:00
const merged = Object.assign(Object.assign({}, closure_4), first);
if (tmp23) {
merged.enableViewRendererV2 = first.enableExperimentalViewRenderer;
}
2026-07-23 10:11:24 +00:00
const dependencyMap = null;
2026-07-20 16:05:17 +00:00
obj = {
name: getCachedReplayId,
setup(on) {
if (obj.hasHooks(on)) {
2026-07-23 10:11:24 +00:00
const NATIVE = first(_null[2]).NATIVE;
2026-07-20 16:05:17 +00:00
const currentReplayId = NATIVE.getCurrentReplayId();
on.on("createDsc", (replay_id) => {
if (!replay_id.replay_id) {
2026-07-23 10:11:24 +00:00
const tmp2 = outer1_3();
2026-07-20 16:05:17 +00:00
if (tmp2) {
replay_id.replay_id = tmp2;
}
}
});
on.on("processMetric", (attributes) => {
2026-07-23 10:11:24 +00:00
const tmp = outer1_3();
2026-07-20 16:05:17 +00:00
if (tmp) {
attributes.attributes = attributes.attributes || {};
attributes.attributes.replay_id = tmp;
}
});
2026-07-23 10:11:24 +00:00
on.on("beforeAddBreadcrumb", first(_null[5]).enrichXhrBreadcrumbsForMobileReplay);
2026-07-20 16:05:17 +00:00
}
},
processEvent(arg0, arg1) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
2026-07-20 16:05:17 +00:00
let closure_1 = arg1;
return updateCachedReplayId(this, undefined, undefined, function*() {
2026-07-23 10:11:24 +00:00
const exception = outer1_0.exception;
const outer1_2 = exception;
2026-07-20 16:05:17 +00:00
let values;
if (null !== exception) {
2026-07-23 10:11:24 +00:00
if (undefined !== outer1_2) {
values = outer1_2.values;
2026-07-20 16:05:17 +00:00
}
}
if (values) {
2026-07-23 10:11:24 +00:00
if (outer1_0.exception.values.length > 0) {
if (closure_0.beforeErrorSampling) {
if (false === closure_0.beforeErrorSampling(outer1_0, outer1_1)) {
const debug = first(794).debug;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
2026-07-23 10:11:24 +00:00
debug.log("[Sentry] " + getCachedReplayId + " not sent; beforeErrorSampling conditions not met for event " + outer1_0.event_id + ".");
return outer1_0;
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
const NATIVE = first(977).NATIVE;
let obj = first(989);
const tmp18 = yield NATIVE.captureReplay(obj.isHardCrash(outer1_0));
2026-07-20 16:05:17 +00:00
if (tmp18) {
2026-07-23 10:11:24 +00:00
outer2_2(tmp18);
const debug4 = first(794).debug;
2026-07-20 16:05:17 +00:00
const _HermesInternal4 = HermesInternal;
2026-07-23 10:11:24 +00:00
debug4.log("[Sentry] " + getCachedReplayId + " Captured recording replay " + tmp18 + " for event " + outer1_0.event_id + ".");
outer1_0.contexts = outer1_0.contexts || {};
2026-07-20 16:05:17 +00:00
const _Object3 = Object;
const _Object4 = Object;
obj = { replay_id: tmp18 };
2026-07-23 10:11:24 +00:00
outer1_0.contexts.replay = Object.assign(Object.assign({}, outer1_0.contexts.replay), obj);
const tmp44 = outer1_0;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
const NATIVE2 = first(977).NATIVE;
2026-07-20 16:05:17 +00:00
const currentReplayId = NATIVE2.getCurrentReplayId();
if (currentReplayId) {
tmp22(currentReplayId);
2026-07-23 10:11:24 +00:00
const debug3 = first(794).debug;
2026-07-20 16:05:17 +00:00
const _HermesInternal3 = HermesInternal;
2026-07-23 10:11:24 +00:00
debug3.log("[Sentry] " + getCachedReplayId + " assign already recording replay " + currentReplayId + " for event " + outer1_0.event_id + ".");
outer1_0.contexts = outer1_0.contexts || {};
2026-07-20 16:05:17 +00:00
const _Object = Object;
const _Object2 = Object;
obj = { replay_id: currentReplayId };
2026-07-23 10:11:24 +00:00
outer1_0.contexts.replay = Object.assign(Object.assign({}, outer1_0.contexts.replay), obj);
const tmp34 = outer1_0;
2026-07-20 16:05:17 +00:00
} else {
tmp22(null);
2026-07-23 10:11:24 +00:00
const debug2 = first(794).debug;
2026-07-20 16:05:17 +00:00
const _HermesInternal2 = HermesInternal;
2026-07-23 10:11:24 +00:00
debug2.log("[Sentry] " + getCachedReplayId + " not sampled for event " + outer1_0.event_id + ".");
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
return outer1_0;
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
return outer1_0;
2026-07-20 16:05:17 +00:00
});
},
options: merged,
getReplayId() {
return getCachedReplayId();
}
};
return obj;
}
2026-07-23 10:11:24 +00:00
obj4 = first(978);
2026-07-20 16:05:17 +00:00
}
return mobileReplayIntegrationNoop();
}
first = closure_4;
};