decord/alpha/source/modules/rtc/hooks/useIsEmptyRTCConnection.tsx

139 lines
4.1 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 8833
// Function ID: 8834
// Name: useIsEmptyRTCConnection
2026-10-09 10:00:15 +00:00
// Dependencies: [502, 5109, 7428, 558, 576, 504, 2]
2026-07-20 16:05:17 +00:00
2026-10-09 10:00:15 +00:00
// Module 8833 (useIsEmptyRTCConnection)
2026-10-03 08:58:59 +00:00
import react from "react" /* 576 */;
import AuthenticationStore from "AuthenticationStore" /* 502 */;
2026-10-09 10:00:15 +00:00
import RTCConnectionStore from "RTCConnectionStore" /* 5109 */;
import StreamRTCConnectionStore from "StreamRTCConnectionStore" /* 7428 */;
2026-10-03 08:58:59 +00:00
import ReactCompilerGating_mod from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-20 16:05:17 +00:00
const require = globalThis.__r;
2026-10-03 08:58:59 +00:00
let _require;
2026-10-03 08:58:59 +00:00
let tmp;
const get_initialized = tmp(504);
let ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsStreamRTCConnectionEmpty(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0;
let first;
let tmp7;
_require = arg0;
const tmp = _require;
const obj = require("react");
const cResult = obj.c(3);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const tmp5 = StreamRTCConnectionStore;
const items = [StreamRTCConnectionStore, ];
let tmp6 = AuthenticationStore;
items[1] = AuthenticationStore;
cResult[0] = items;
first = items;
} else {
first = cResult[0];
}
if (cResult[1] !== arg0) {
const fn = function u() {
if (null == closure_0) {
return true;
} else {
const userIds = StreamRTCConnectionStore.getUserIds(tmp);
let tmp3 = null == userIds;
if (!tmp3) {
let tmp6 = 0 === userIds.size;
if (!tmp6) {
tmp6 = 1 === userIds.size && userIds.has(tmp5);
1 === userIds.size && userIds.has(tmp5);
}
tmp3 = tmp6;
}
return tmp3;
}
};
cResult[1] = arg0;
cResult[2] = fn;
tmp7 = fn;
} else {
tmp7 = cResult[2];
}
const tmpResult = tmp(504);
return tmpResult.useStateFromStores(first, tmp7);
2026-10-08 09:57:35 +00:00
}) : (function useIsStreamRTCConnectionEmpty(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0;
_require = arg0;
const items = [StreamRTCConnectionStore, AuthenticationStore];
2026-10-03 08:58:59 +00:00
const obj = require("get initialized");
return obj.useStateFromStores(items, () => {
2026-07-23 10:11:24 +00:00
if (null == closure_0) {
2026-07-20 16:05:17 +00:00
return true;
} else {
const userIds = StreamRTCConnectionStore.getUserIds(tmp);
2026-07-29 08:29:29 +00:00
let tmp3 = null == userIds;
if (!tmp3) {
let tmp6 = 0 === userIds.size;
if (!tmp6) {
tmp6 = 1 === userIds.size && userIds.has(tmp5);
2026-10-03 08:58:59 +00:00
1 === userIds.size && userIds.has(tmp5);
2026-07-29 08:29:29 +00:00
}
tmp3 = tmp6;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp3;
2026-07-20 16:05:17 +00:00
}
});
2026-10-03 08:58:59 +00:00
});
ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
let tmp3 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsCallRTCConnectionEmpty() {
2026-10-03 08:58:59 +00:00
let tmp4;
let tmp5;
let tmp = require;
const obj = react;
const cResult = obj.c(2);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [RTCConnectionStore, AuthenticationStore];
const fn = function o() {
userIds = userIds.getUserIds();
let tmp = null == userIds;
if (!tmp) {
let tmp4 = 0 === userIds.size;
if (!tmp4) {
tmp4 = 1 === userIds.size && userIds.has(tmp3);
1 === userIds.size && userIds.has(tmp3);
}
tmp = tmp4;
}
return tmp;
};
cResult[0] = items;
cResult[1] = fn;
tmp5 = fn;
tmp4 = items;
} else {
[tmp4, tmp5] = cResult;
}
const tmpResult = get_initialized;
return tmpResult.useStateFromStores(tmp4, tmp5);
2026-10-08 09:57:35 +00:00
}) : (function useIsCallRTCConnectionEmpty() {
const items = [RTCConnectionStore, AuthenticationStore];
2026-10-03 08:58:59 +00:00
const obj = get_initialized;
return obj.useStateFromStores(items, () => {
2026-07-29 08:29:29 +00:00
userIds = userIds.getUserIds();
let tmp = null == userIds;
if (!tmp) {
let tmp4 = 0 === userIds.size;
if (!tmp4) {
tmp4 = 1 === userIds.size && userIds.has(tmp3);
2026-10-03 08:58:59 +00:00
1 === userIds.size && userIds.has(tmp3);
2026-07-29 08:29:29 +00:00
}
tmp = tmp4;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp;
2026-07-20 16:05:17 +00:00
});
2026-10-03 08:58:59 +00:00
});
const result = size.fileFinishedImporting("modules/rtc/hooks/useIsEmptyRTCConnection.tsx");
export const useIsStreamRTCConnectionEmpty = tmp2;
export const useIsCallRTCConnectionEmpty = tmp3;