Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4943.js (118.4 MB)
78 lines
2.4 KiB
TypeScript
78 lines
2.4 KiB
TypeScript
// Module ID: 10201
|
|
// Function ID: 10202
|
|
// Name: useHasVideoPermission
|
|
// Dependencies: [2067, 4399, 558, 568, 7967, 504, 2]
|
|
// Exports: getVideoPermission
|
|
|
|
// Module 10201 (useHasVideoPermission)
|
|
import StreamPermissionUtils from "StreamPermissionUtils" /* 7967 */;
|
|
import GuildStore from "GuildStore" /* 2067 */;
|
|
import PermissionStore from "PermissionStore" /* 4399 */;
|
|
|
|
const require = globalThis.__r;
|
|
|
|
require = fn;
|
|
const ReactCompilerGating = fn(558);
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/video_calls/useHasVideoPermission.tsx");
|
|
|
|
export default ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
|
|
_require = arg0;
|
|
const cResult = require("c").c(4);
|
|
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
const items = [GuildStore, PermissionStore];
|
|
cResult[0] = items;
|
|
let first = items;
|
|
} else {
|
|
first = cResult[0];
|
|
}
|
|
if (cResult[1] !== arg0) {
|
|
const fn = function l() {
|
|
let tmp = null != closure_0;
|
|
if (tmp) {
|
|
let isPrivateResult = obj.isPrivate();
|
|
if (!isPrivateResult) {
|
|
const obj2 = StreamPermissionUtils;
|
|
isPrivateResult = obj2.canStreamInChannel(obj, GuildStore, PermissionStore, false);
|
|
}
|
|
tmp = isPrivateResult;
|
|
}
|
|
return tmp;
|
|
};
|
|
const items1 = [arg0];
|
|
cResult[1] = arg0;
|
|
cResult[2] = fn;
|
|
cResult[3] = items1;
|
|
let tmp8 = items1;
|
|
let tmp7 = fn;
|
|
} else {
|
|
tmp7 = cResult[2];
|
|
tmp8 = cResult[3];
|
|
}
|
|
const obj = require("c");
|
|
return require("initialize").useStateFromStores(first, tmp7, tmp8);
|
|
}) : ((arg0) => {
|
|
_require = arg0;
|
|
const items = [GuildStore, PermissionStore];
|
|
const items1 = [arg0];
|
|
return require("initialize").useStateFromStores(items, () => {
|
|
let tmp = null != closure_0;
|
|
if (tmp) {
|
|
let isPrivateResult = obj.isPrivate();
|
|
if (!isPrivateResult) {
|
|
const obj2 = StreamPermissionUtils;
|
|
isPrivateResult = obj2.canStreamInChannel(obj, GuildStore, PermissionStore, false);
|
|
}
|
|
tmp = isPrivateResult;
|
|
}
|
|
return tmp;
|
|
}, items1);
|
|
});
|
|
export const getVideoPermission = function getVideoPermission(channel) {
|
|
let isPrivateResult = channel.isPrivate();
|
|
if (!isPrivateResult) {
|
|
const obj = StreamPermissionUtils;
|
|
isPrivateResult = obj.canStreamInChannel(channel, GuildStore, PermissionStore, false);
|
|
}
|
|
return isPrivateResult;
|
|
};
|