2026-07-29 08:29:29 +00:00
|
|
|
// Module ID: 887
|
|
|
|
|
// Function ID: 888
|
|
|
|
|
// Name: setupIntegration
|
|
|
|
|
// Dependencies: [823, 824, 848]
|
|
|
|
|
|
|
|
|
|
// Module 887 (setupIntegration)
|
|
|
|
|
const require = arg1;
|
|
|
|
|
let dependencyMap = arg6;
|
|
|
|
|
function setupIntegration(on, name) {
|
|
|
|
|
const _require = on;
|
|
|
|
|
if (arg2[name.name]) {
|
|
|
|
|
if (_require(823).DEBUG_BUILD) {
|
|
|
|
|
const debug2 = tmp10(824).debug;
|
|
|
|
|
const _HermesInternal2 = HermesInternal;
|
|
|
|
|
debug2.log("Integration skipped because it was already installed: " + name.name);
|
|
|
|
|
}
|
|
|
|
|
tmp10 = _require;
|
|
|
|
|
} else {
|
|
|
|
|
arg2[name.name] = name;
|
|
|
|
|
let arr = items;
|
|
|
|
|
if (!tmp) {
|
|
|
|
|
name.setupOnce();
|
|
|
|
|
arr = arr.push(name.name);
|
|
|
|
|
}
|
|
|
|
|
if (tmp4) {
|
|
|
|
|
name.setup(on);
|
|
|
|
|
}
|
2026-08-04 21:03:28 +00:00
|
|
|
if (typeof name.preprocessEvent === "function") {
|
2026-07-29 08:29:29 +00:00
|
|
|
const preprocessEvent = name.preprocessEvent;
|
|
|
|
|
const dependencyMap = preprocessEvent.bind(name);
|
|
|
|
|
on.on("preprocessEvent", (arg0, arg1) => callback(arg0, arg1, closure_0));
|
|
|
|
|
}
|
2026-08-04 21:03:28 +00:00
|
|
|
if (typeof name.processEvent === "function") {
|
2026-07-29 08:29:29 +00:00
|
|
|
const processEvent = name.processEvent;
|
|
|
|
|
items = processEvent.bind(name);
|
|
|
|
|
const _Object = Object;
|
|
|
|
|
const obj = { id: null };
|
|
|
|
|
obj[0] = name.name;
|
|
|
|
|
on.addEventProcessor(Object.assign((arg0, arg1) => callback2(arg0, arg1, closure_0), obj));
|
|
|
|
|
}
|
|
|
|
|
if (_require(823).DEBUG_BUILD) {
|
|
|
|
|
const debug = tmp6(824).debug;
|
|
|
|
|
const _HermesInternal = HermesInternal;
|
|
|
|
|
debug.log("Integration installed: " + name.name);
|
|
|
|
|
}
|
2026-08-04 21:03:28 +00:00
|
|
|
tmp = items.includes(name.name) || typeof name.setupOnce !== "function";
|
|
|
|
|
tmp4 = name.setup && typeof name.setup === "function";
|
2026-07-29 08:29:29 +00:00
|
|
|
tmp6 = _require;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Object.defineProperty(arg5, Symbol.toStringTag, { value: "Module" });
|
|
|
|
|
let items = [];
|
|
|
|
|
arg5.addIntegration = function addIntegration(name) {
|
|
|
|
|
const client = require(848) /* getClient */.getClient();
|
|
|
|
|
if (client) {
|
|
|
|
|
client.addIntegration(name);
|
|
|
|
|
} else if (tmp(823).DEBUG_BUILD) {
|
|
|
|
|
const debug = tmp(824).debug;
|
|
|
|
|
const _HermesInternal = HermesInternal;
|
|
|
|
|
debug.warn("Cannot add integration \"" + name.name + "\" because no SDK Client is available.");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
arg5.afterSetupIntegrations = function afterSetupIntegrations(arg0, arg1) {
|
|
|
|
|
const iter = arg1[Symbol.iterator]();
|
|
|
|
|
const nextResult = iter.next();
|
|
|
|
|
while (iter !== undefined) {
|
|
|
|
|
let obj = nextResult;
|
|
|
|
|
let afterAllSetup;
|
|
|
|
|
if (nextResult != null) {
|
|
|
|
|
afterAllSetup = nextResult.afterAllSetup;
|
|
|
|
|
}
|
|
|
|
|
if (afterAllSetup) {
|
|
|
|
|
let tmp3 = nextResult;
|
|
|
|
|
let afterAllSetupResult = obj.afterAllSetup(arg0);
|
|
|
|
|
}
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
arg5.defineIntegration = function defineIntegration(arg0) {
|
|
|
|
|
return arg0;
|
|
|
|
|
};
|
|
|
|
|
arg5.getIntegrationsToSetup = function getIntegrationsToSetup(defaultIntegrations) {
|
|
|
|
|
const arr = defaultIntegrations.defaultIntegrations || [];
|
|
|
|
|
const integrations = defaultIntegrations.integrations;
|
|
|
|
|
const item = arr.forEach((arg0) => {
|
|
|
|
|
arg0.isDefaultInstance = true;
|
|
|
|
|
});
|
|
|
|
|
if (Array.isArray(integrations)) {
|
|
|
|
|
const items = [];
|
|
|
|
|
HermesBuiltin.arraySpread(integrations, HermesBuiltin.arraySpread(arr, 0));
|
|
|
|
|
let arr2 = items;
|
|
|
|
|
} else {
|
|
|
|
|
arr2 = arr;
|
2026-08-04 21:03:28 +00:00
|
|
|
if (typeof integrations === "function") {
|
2026-07-29 08:29:29 +00:00
|
|
|
const integrationsResult = integrations(arr);
|
|
|
|
|
const _Array = Array;
|
|
|
|
|
let tmp2 = integrationsResult;
|
|
|
|
|
if (!Array.isArray(integrationsResult)) {
|
|
|
|
|
const items1 = [integrationsResult];
|
|
|
|
|
tmp2 = items1;
|
|
|
|
|
}
|
|
|
|
|
arr2 = tmp2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const obj = {};
|
|
|
|
|
const item1 = arr2.forEach((name) => {
|
|
|
|
|
name = name.name;
|
|
|
|
|
let isDefaultInstance = tmp2;
|
|
|
|
|
if (obj[name]) {
|
|
|
|
|
isDefaultInstance = !tmp2.isDefaultInstance;
|
|
|
|
|
}
|
|
|
|
|
if (isDefaultInstance) {
|
|
|
|
|
isDefaultInstance = name.isDefaultInstance;
|
|
|
|
|
}
|
|
|
|
|
if (!isDefaultInstance) {
|
|
|
|
|
obj[name] = name;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return Object.values(obj);
|
|
|
|
|
};
|
|
|
|
|
arg5.installedIntegrations = items;
|
|
|
|
|
arg5.setupIntegration = setupIntegration;
|
|
|
|
|
arg5.setupIntegrations = function setupIntegrations(arg0, arr) {
|
|
|
|
|
let closure_0 = arg0;
|
|
|
|
|
const obj = {};
|
|
|
|
|
const item = arr.forEach((arg0) => {
|
|
|
|
|
if (arg0) {
|
|
|
|
|
outer1_3(closure_0, arg0, obj);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return obj;
|
|
|
|
|
};
|