This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

+53
View File
@@ -0,0 +1,53 @@
// Metro module 9471 (f9472).
import _slicedToArray from "../../_bundle/_slicedToArray";
import { create } from "../../_bundle/Module644";
import { batchUpdates } from "../../_bundle/Module705";
import MonitoringAgent from "../monitoring/MonitoringAgent";
import { MetricEvents } from "../../_bundle/Module5872";
let c6247_4 = create(() => ({
captchaServeVolume: {}
}));
export { c6247_4 as useCaptchaStore };
export function isCaptchaStoreVolumeEmpty() {
return Object.keys(c6247_4.getState().captchaServeVolume).length === 0;
}
export function incrementCaptchaServeVolume(c17242_0) {
batchUpdates(() => {
c6247_4.setState((state) => {
let r13;
let r10 = state;
if (c17242_0 != null) {
const r11 = c17242_0 in state.captchaServeVolume;
const r4 = {
captchaServeVolume: null
};
const captchaServeVolume = {
...state.captchaServeVolume
};
if (r11) {
captchaServeVolume[c17242_0] = state.captchaServeVolume[c17242_0] + 1;
r4.captchaServeVolume = captchaServeVolume;
r13 = r4;
} else {
captchaServeVolume[c17242_0] = 1;
r4.captchaServeVolume = captchaServeVolume;
r13 = r4;
}
r10 = r13;
}
return r10;
});
});
}
export function flushCaptchaServeVolume() {
for (const item of Object.entries(c6247_4.getState().captchaServeVolume)) {
const r38 = _slicedToArray(item, 2);
MonitoringAgent.distribution({
name: MetricEvents.CAPTCHA_SERVE_VOLUME_DISTRIBUTION,
tags: [`user_flow:${r38[0]}`]
}, r38[1], true);
}
batchUpdates(() => c6247_4.setState({
captchaServeVolume: {}
}));
}