decord/source/modules/rtc/hooks/useSecureFramesPairwiseFingerprint.tsx

75 lines
3 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 8830
2026-07-27 11:26:19 +00:00
// Function ID: 69960
2026-07-20 16:05:17 +00:00
// Name: useSecureFramesPairwiseFingerprint
2026-07-25 08:10:48 +00:00
// Dependencies: [5, 57, 31, 1194, 4178, 4203, 8826, 4192, 566, 44, 206, 8809, 2]
2026-07-20 16:05:17 +00:00
// Exports: useSecureFramesPairwiseFingerprint
2026-07-25 08:10:48 +00:00
// Module 8830 (useSecureFramesPairwiseFingerprint)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import _slicedToArray from "_slicedToArray";
import result from "result";
import closure_6 from "_isNativeReflectConstruct";
import closure_7 from "_isNativeReflectConstruct";
import closure_8 from "_isNativeReflectConstruct";
import { SECURE_FRAMES_GENERATE_FINGERPRINT_VERSION as closure_9 } from "SECURE_FRAMES_LINKING_BOTTOM_SHEET_KEY";
import { Features } from "DesktopSources";
const require = arg1;
const result = require("result").fileFinishedImporting("modules/rtc/hooks/useSecureFramesPairwiseFingerprint.tsx");
2026-07-20 16:05:17 +00:00
export const useSecureFramesPairwiseFingerprint = function useSecureFramesPairwiseFingerprint(userId) {
userId = userId.userId;
2026-07-23 10:11:24 +00:00
const items = [stateFromStores1];
const stateFromStores = userId(first[8]).useStateFromStores(items, () => stateFromStores1.getId());
stateFromStores(first[9])(stateFromStores !== userId, "[useSecureFramesPairwiseFingerprint] Should not pass current user id.");
const tmp3 = first1(React.useState(null), 2);
first = tmp3[0];
let _isNativeReflectConstruct = tmp3[1];
const tmp5 = first1(React.useState(false), 2);
first1 = tmp5[0];
React = tmp5[1];
const obj = userId(first[8]);
const items1 = [callback];
stateFromStores1 = userId(first[8]).useStateFromStores(items1, () => callback.getSecureFramesRosterMapEntry(userId));
const obj2 = userId(first[8]);
const items2 = [callback];
const stateFromStores2 = userId(first[8]).useStateFromStores(items2, () => callback.getSecureFramesRosterMapEntry(stateFromStores));
2026-07-20 16:05:17 +00:00
callback = React.useCallback((arg0) => {
callback(stateFromStores(first[10]).fromByteArray(arg0));
callback2(false);
}, []);
const items3 = [callback];
2026-07-23 10:11:24 +00:00
const callback1 = React.useCallback((() => {
2026-07-20 16:05:17 +00:00
// CreateGeneratorClosureLongIndex (0x67)
let closure_0 = callback(tmp);
return function() {
return callback(...arguments);
};
2026-07-23 10:11:24 +00:00
})(), items3);
2026-07-20 16:05:17 +00:00
let closure_10 = React.useRef(null);
const items4 = [stateFromStores, stateFromStores2, callback1, userId, stateFromStores1];
const effect = React.useEffect(() => {
let tmp = null != stateFromStores1;
if (tmp) {
tmp = null != stateFromStores2;
}
if (tmp) {
tmp = null == ref.current;
}
if (tmp) {
callback2(true);
const _setTimeout = setTimeout;
2026-07-23 10:11:24 +00:00
ref.current = setTimeout(() => outer1_9(outer1_1, outer1_7, current, outer1_6), 0);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const current = ref.current;
2026-07-20 16:05:17 +00:00
return () => {
if (null != current) {
const _clearTimeout = clearTimeout;
clearTimeout(current);
}
};
}, items4);
const items5 = [first, first1, stateFromStores1];
return React.useMemo(() => ({ fingerprint: first, userKey: stateFromStores1, loading: first1 }), items5);
};