Files
discord-decomp/_bundle/Module1617.js
T
2026-11-01 12:12:55 +02:00

78 lines
2.6 KiB
JavaScript

// Metro module 1617 (f1618).
import _slicedToArray from "./_slicedToArray";
let t, c1281_3;
const r19 = function t(a0) {
const error = new Error(a0 ? `[Reanimated] ${a0}` : "[Reanimated]");
error.name = "ReanimatedError";
return error;
};
r19.__closure = {};
r19.__workletHash = 17260882889510;
r19.__initData = {
code: "function ReanimatedError_Pnpm_errorsTs1(message){const prefix='[Reanimated]';const errorInstance=new Error(message?prefix+\" \"+message:prefix);errorInstance.name='ReanimatedError';return errorInstance;}"
};
t = r19;
export function registerReanimatedError() {
if (_WORKLET) {
global.ReanimatedError = t;
return void 0;
}
throw new Error("[Reanimated] registerReanimatedError() must be called on Worklet runtime");
}
registerReanimatedError.__closure = {
ReanimatedErrorConstructor: t
};
registerReanimatedError.__workletHash = 12525509537607;
registerReanimatedError.__initData = {
code: "function registerReanimatedError_Pnpm_errorsTs2(){const{ReanimatedErrorConstructor}=this.__closure;if(!_WORKLET){throw new Error('[Reanimated] registerReanimatedError() must be called on Worklet runtime');}global.ReanimatedError=ReanimatedErrorConstructor;}"
};
c1281_3 = new Map();
export { t as ReanimatedError };
export function registerWorkletStackDetails(a0, a1) {
c1281_3.set(a0, a1);
}
export function reportFatalErrorOnJS({ message, stack: stack2 }) {
const error = new Error();
error.message = message;
let stack3 = void 0;
if (stack2) {
const r16 = stack2.match(/worklet_(\d+):(\d+):(\d+)/g);
const stack = stack2;
if (r16 != null) {
r16.forEach((item) => {
let r42;
const [, r28, r13, r10] = item.split(/:|_/).map(Number);
const r31 = c1281_3.get(r28);
if (r31) {
const [r33, r12, r34] = r31;
const stack2 = r33.stack;
const r4 = stack2 == null;
let r14 = void 0;
if (!r4) {
const r37 = stack2.split("\n");
r14 = r37 == null ? void 0 : r37[0];
}
if (r14) {
const r41 = /@([^@]+):(\d+):(\d+)/.exec(r14);
if (r41) {
const [, r44, r16, r45] = r41;
r42 = [r44, Number(r16), Number(r45)];
} else {
r42 = ["unknown", 0, 0];
}
} else {
r42 = ["unknown", 0, 0];
}
const r52 = _slicedToArray(r42, 3);
stack = stack.replace(item, `${r52[0]}:${r13 + r52[1] + r12}:${r10 + r52[2] + r34}`);
}
});
}
stack3 = stack;
}
error.stack = stack3;
error.name = "ReanimatedError";
error.jsEngine = "reanimated";
global.ErrorUtils.reportFatalError(error);
}