decord/source/1076__wrapTimeFunction.js

192 lines
7.7 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 1076
// Function ID: 1077
// Name: _wrapTimeFunction
// Dependencies: [817, 1028]
// Module 1076 (_wrapTimeFunction)
2026-08-24 06:08:38 +00:00
import registerSpanErrorInstrumentation from "registerSpanErrorInstrumentation" /* 817 */;
2026-07-29 08:29:29 +00:00
function _wrapTimeFunction(arg0) {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
2026-07-29 08:29:29 +00:00
return function() {
const items = [...arguments];
2026-08-24 06:08:38 +00:00
let obj = callback(closure_1_1[1]);
2026-07-29 08:29:29 +00:00
obj = { mechanism: null };
2026-08-24 06:08:38 +00:00
obj = { handled: false, type: "auto.browser.browserapierrors." + callback(closure_1_1[0]).getFunctionName(callback) };
2026-07-29 08:29:29 +00:00
obj[0] = obj;
items[0] = obj.wrap(items[0], obj);
return callback.apply(this, items);
};
}
function _wrapRAF(arg0) {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
2026-07-29 08:29:29 +00:00
return function(arg0) {
2026-08-24 06:08:38 +00:00
let obj = callback(closure_1_1[1]);
2026-07-29 08:29:29 +00:00
obj = { mechanism: null };
obj = { data: null, handled: false, type: "auto.browser.browserapierrors.requestAnimationFrame" };
2026-08-24 06:08:38 +00:00
obj1 = { handler: callback(closure_1_1[0]).getFunctionName(callback) };
2026-07-29 08:29:29 +00:00
obj[0] = obj1;
obj[0] = obj;
const items = [obj.wrap(arg0, obj)];
return callback.apply(this, items);
};
}
function _wrapXHR(arg0) {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
2026-07-29 08:29:29 +00:00
return function() {
const self = this;
const items = ["onload", "onerror", "onprogress", "onreadystatechange"];
const items1 = [...arguments];
const item = items.forEach((arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
2026-07-29 08:29:29 +00:00
if (tmp2) {
2026-08-24 06:08:38 +00:00
self(closure_1_1[0]).fill(tmp, arg0, (arg0) => {
2026-07-29 08:29:29 +00:00
let obj = { mechanism: null };
obj = { data: null, handled: false, type: null };
2026-08-24 06:08:38 +00:00
obj = { handler: callback(closure_1_1[0]).getFunctionName(arg0) };
2026-07-29 08:29:29 +00:00
obj[0] = obj;
obj[2] = "auto.browser.browserapierrors.xhr." + callback;
obj[0] = obj;
2026-08-24 06:08:38 +00:00
const obj4 = callback(closure_1_1[0]);
const originalFunction = callback(closure_1_1[0]).getOriginalFunction(arg0);
2026-07-29 08:29:29 +00:00
if (originalFunction) {
let tmpResult = tmp(tmp2[0]);
obj.mechanism.data.handler = tmpResult.getFunctionName(originalFunction);
}
tmpResult = tmp(tmp2[1]);
return tmpResult.wrap(arg0, obj);
});
2026-08-24 06:08:38 +00:00
let obj = self(closure_1_1[0]);
2026-07-29 08:29:29 +00:00
}
});
return self.apply(this, items1);
};
}
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
let closure_2 = ["EventTarget", "Window", "Node", "ApplicationCache", "AudioTrackList", "BroadcastChannel", "ChannelMergerNode", "CryptoOperation", "EventSource", "FileReader", "HTMLUnknownElement", "IDBDatabase", "IDBRequest", "IDBTransaction", "KeyOperation", "MediaController", "MessagePort", "ModalWindow", "Notification", "SVGElementInstance", "Screen", "SharedWorker", "TextTrack", "TextTrackCue", "TextTrackList", "WebSocket", "WebSocketWorker", "Worker", "XMLHttpRequest", "XMLHttpRequestEventTarget", "XMLHttpRequestUpload"];
export const browserApiErrorsIntegration = registerSpanErrorInstrumentation.defineIntegration(() => {
let obj = arg0;
if (arg0 === undefined) {
obj = {};
}
obj = undefined;
obj = { XMLHttpRequest: true, eventTarget: true, requestAnimationFrame: true, setInterval: true, setTimeout: true, unregisterOriginalCallbacks: false };
const merged = Object.assign(obj);
obj = {
name: "BrowserApiErrors",
setupOnce() {
if (obj.setTimeout) {
2026-08-24 06:08:38 +00:00
obj = obj(closure_1_1[0]);
obj.fill(obj(closure_1_1[1]).WINDOW, "setTimeout", closure_1_3);
2026-07-29 08:29:29 +00:00
}
if (obj.setInterval) {
2026-08-24 06:08:38 +00:00
obj(closure_1_1[0]).fill(obj(closure_1_1[1]).WINDOW, "setInterval", closure_1_3);
let obj2 = obj(closure_1_1[0]);
2026-07-29 08:29:29 +00:00
}
if (obj.requestAnimationFrame) {
2026-08-24 06:08:38 +00:00
obj(closure_1_1[0]).fill(obj(closure_1_1[1]).WINDOW, "requestAnimationFrame", closure_1_4);
let obj3 = obj(closure_1_1[0]);
2026-07-29 08:29:29 +00:00
}
let _XMLHttpRequest = tmp.XMLHttpRequest;
if (_XMLHttpRequest) {
2026-08-24 06:08:38 +00:00
_XMLHttpRequest = "XMLHttpRequest" in obj(closure_1_1[1]).WINDOW;
2026-07-29 08:29:29 +00:00
}
if (_XMLHttpRequest) {
const _XMLHttpRequest2 = XMLHttpRequest;
2026-08-24 06:08:38 +00:00
obj(closure_1_1[0]).fill(XMLHttpRequest.prototype, "send", closure_1_5);
let obj4 = obj(closure_1_1[0]);
2026-07-29 08:29:29 +00:00
}
let eventTarget = tmp.eventTarget;
if (eventTarget) {
const _Array = Array;
if (!Array.isArray(eventTarget)) {
2026-08-24 06:08:38 +00:00
eventTarget = closure_1_2;
2026-07-29 08:29:29 +00:00
}
const item = eventTarget.forEach((arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
closure_1 = closure_0;
const tmp3 = closure_1_0(closure_1_1[1]).WINDOW[arg0];
2026-07-29 08:29:29 +00:00
let prototype;
if (tmp3 != null) {
prototype = tmp3.prototype;
}
let hasOwnPropertyResult;
if (prototype != null) {
const hasOwnProperty = prototype.hasOwnProperty;
if (hasOwnProperty != null) {
hasOwnPropertyResult = hasOwnProperty("addEventListener");
}
}
if (hasOwnPropertyResult) {
let tmpResult = tmp(tmp2[0]);
tmpResult.fill(prototype, "addEventListener", (arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
2026-07-29 08:29:29 +00:00
return function(arg0, handleEvent) {
try {
if ((function isEventListenerObject() { ... })(handleEvent)) {
2026-08-24 06:08:38 +00:00
obj = callback(1028);
2026-07-29 08:29:29 +00:00
obj = { mechanism: null };
obj = { data: null, handled: false, type: "auto.browser.browserapierrors.handleEvent" };
2026-08-24 06:08:38 +00:00
obj1 = { handler: null, target: null };
2026-07-29 08:29:29 +00:00
let obj4 = callback(817);
obj1[0] = obj4.getFunctionName(handleEvent);
obj1[1] = callback;
obj[0] = obj1;
obj[0] = obj;
handleEvent.handleEvent = obj.wrap(handleEvent.handleEvent, obj);
}
const self = this;
2026-08-24 06:08:38 +00:00
if (closure_1_1.unregisterOriginalCallbacks) {
2026-07-29 08:29:29 +00:00
(function unregisterOriginalCallback() { ... })(self, arg0, handleEvent);
}
const items = [arg0, , ];
const obj2 = { mechanism: null };
const obj3 = { data: null, handled: false, type: "auto.browser.browserapierrors.addEventListener" };
obj4 = { handler: null, target: null };
const obj6 = callback(1028);
obj4[0] = callback(817).getFunctionName(handleEvent);
obj4[1] = callback;
obj3[0] = obj4;
obj2[0] = obj3;
items[1] = obj6.wrap(handleEvent, obj2);
items[2] = arg2;
return callback.apply(self, items);
} catch (err) {
}
};
});
tmpResult = tmp(tmp2[0]);
tmpResult.fill(prototype, "removeEventListener", (arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
2026-07-29 08:29:29 +00:00
return function(arg0, __sentry_wrapped__) {
const self = this;
try {
__sentry_wrapped__ = __sentry_wrapped__.__sentry_wrapped__;
if (__sentry_wrapped__) {
const call = closure_0.call;
if (typeof call === "unknown") {
tmp2(arg0, __sentry_wrapped__, arg2);
} else {
call(self, arg0, tmp, arg2);
}
}
const call2 = closure_0.call;
if (typeof call2 === "unknown") {
let call2Result = tmp4(arg0, __sentry_wrapped__, arg2);
} else {
call2Result = call2(self, arg0, __sentry_wrapped__, arg2);
}
return call2Result;
} catch (err) {
}
};
});
}
});
}
}
};
return obj;
});