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

94 lines
2.5 KiB
JavaScript

// Metro module 1143 (f1144).
import { getGlobalScope } from "./Module817";
function $mk117635($env) {
return (a0, a1) => {
const r14 = (0, $env[0])(a0, a1);
const r15 = $env.$parent.$parent;
const r10 = r15[0];
const r8 = r15[1];
const currentScope = r10(r8[0]).getCurrentScope();
const r20 = $env.$parent[0];
const data = r20.actionTransformer(a1);
if (data != null) {
r10(r8[0]).addBreadcrumb({
category: "redux.action",
data,
type: "info"
});
}
const value = r20.stateTransformer(r14);
if (value != null) {
const client = r10(r8[0]).getClient();
const r37 = (client == null ? void 0 : client.getOptions())?.normalizeDepth || 3;
const r39 = {
state: {
type: "redux",
value
}
};
r10(r8[0]).addNonEnumerableProperty(r39, "__sentry_override_normalization_depth__", 3 + r37);
currentScope.setContext("state", r39);
} else {
currentScope.setContext("state", null);
}
const configureScopeWithState = r20.configureScopeWithState;
if (typeof configureScopeWithState === "function") {
configureScopeWithState(currentScope, r14);
}
return r14;
};
}
let env950 = {};
Object.defineProperty(exports, Symbol.toStringTag, {
value: "Module"
});
const c950_2 = {
attachReduxState: true,
actionTransformer: (a0) => a0,
stateTransformer: (a0) => a0 ? a0 : null
};
export function createReduxEnhancer(a0) {
let env12833 = {
$parent: env950
};
env12833[0] = {
...c950_2,
...a0
};
return (c24235_0) => (a0, a1) => {
const r3 = env12833;
if (env12833[0].attachReduxState) {
getGlobalScope().addEventProcessor((a0, a1) => {
try {
if (a0.type === void 0 && a0.contexts.state.state.type === "redux") {
a1.attachments = [...a1.attachments || [], {
filename: "redux_state.json",
data: JSON.stringify(a0.contexts.state.state.value)
}];
}
} catch ($e) {}
return a0;
});
}
let env28832;
const r21 = env28832 = {
$parent: r3
};
env28832[0] = a0;
const r24 = c24235_0($mk117635(r21), a1);
r24.replaceReducer = new Proxy(r24.replaceReducer, {
apply: function apply(a0, a1, a2) {
let env31217;
const apply2 = a0.apply;
const r2 = a2[0];
const r5 = env31217 = {
$parent: env12833
};
env31217[0] = r2;
apply2.call(a0, a1, [$mk117635(r5)]);
}
});
return r24;
};
}