2026-10-10 08:08:14 +00:00
|
|
|
// Module ID: 11174
|
|
|
|
|
// Function ID: 11175
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useFetchStreamPreview
|
2026-10-12 06:59:38 +00:00
|
|
|
// Dependencies: [19, 7446, 2065, 4750, 2116, 1096, 558, 576, 504, 7444, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-10-10 08:08:14 +00:00
|
|
|
// Module 11174 (useFetchStreamPreview)
|
2026-10-03 08:58:59 +00:00
|
|
|
import Constants from "Constants" /* 1096 */;
|
2026-10-12 06:59:38 +00:00
|
|
|
import StreamActionCreators from "StreamActionCreators" /* 7444 */;
|
2026-10-03 08:58:59 +00:00
|
|
|
import react_mod from "react" /* 19 */;
|
2026-10-12 06:59:38 +00:00
|
|
|
import ApplicationStreamPreviewStore from "ApplicationStreamPreviewStore" /* 7446 */;
|
2026-10-10 08:08:14 +00:00
|
|
|
import ChannelStore from "ChannelStore" /* 2065 */;
|
|
|
|
|
import PermissionStore from "PermissionStore" /* 4750 */;
|
|
|
|
|
import SelectedChannelStore from "SelectedChannelStore" /* 2116 */;
|
2026-10-03 08:58:59 +00:00
|
|
|
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
|
|
|
|
|
import size from "module_2" /* 2 */;
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const require = globalThis.__r;
|
2026-10-03 08:58:59 +00:00
|
|
|
let _require, closure_4, dependencyMap;
|
2026-09-10 05:38:07 +00:00
|
|
|
|
2026-10-03 08:58:59 +00:00
|
|
|
let react = react_mod;
|
|
|
|
|
const BasicPermissions = Constants.BasicPermissions;
|
2026-10-08 09:57:35 +00:00
|
|
|
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useFetchStreamPreview(arg0, arg1, arg2) {
|
2026-10-03 08:58:59 +00:00
|
|
|
let closure_0;
|
|
|
|
|
let closure_1;
|
|
|
|
|
let first;
|
|
|
|
|
let stateFromStores;
|
|
|
|
|
let tmp11;
|
|
|
|
|
let tmp13;
|
|
|
|
|
let tmp15;
|
|
|
|
|
let tmp7;
|
|
|
|
|
let tmp9;
|
2026-09-10 05:38:07 +00:00
|
|
|
_require = arg0;
|
2026-08-24 06:08:38 +00:00
|
|
|
dependencyMap = arg1;
|
2026-10-03 08:58:59 +00:00
|
|
|
let closure_2 = arg2;
|
|
|
|
|
let tmp = _require;
|
|
|
|
|
let obj = require("react");
|
|
|
|
|
const cResult = obj.c(27);
|
|
|
|
|
let closure_3 = tmp4;
|
|
|
|
|
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
|
|
|
const items = [stateFromStores];
|
|
|
|
|
cResult[0] = items;
|
|
|
|
|
first = items;
|
|
|
|
|
} else {
|
|
|
|
|
first = cResult[0];
|
|
|
|
|
}
|
|
|
|
|
if (cResult[1] !== arg1) {
|
|
|
|
|
const fn = function w() {
|
|
|
|
|
return ChannelStore.getChannel(closure_1);
|
|
|
|
|
};
|
|
|
|
|
cResult[1] = arg1;
|
|
|
|
|
cResult[2] = fn;
|
|
|
|
|
tmp7 = fn;
|
|
|
|
|
} else {
|
|
|
|
|
tmp7 = cResult[2];
|
|
|
|
|
}
|
|
|
|
|
const tmpResult = tmp(504);
|
|
|
|
|
stateFromStores = tmpResult.useStateFromStores(first, tmp7);
|
|
|
|
|
if (cResult[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
|
|
|
const items1 = [PermissionStore];
|
|
|
|
|
cResult[3] = items1;
|
|
|
|
|
tmp9 = items1;
|
|
|
|
|
} else {
|
|
|
|
|
tmp9 = cResult[3];
|
|
|
|
|
}
|
|
|
|
|
if (cResult[4] !== stateFromStores) {
|
|
|
|
|
const fn2 = function _() {
|
|
|
|
|
const canBasicChannelResult = null != stateFromStores && PermissionStore.canBasicChannel(BasicPermissions.CONNECT, tmp);
|
|
|
|
|
return canBasicChannelResult;
|
|
|
|
|
};
|
|
|
|
|
cResult[4] = stateFromStores;
|
|
|
|
|
cResult[5] = fn2;
|
|
|
|
|
tmp11 = fn2;
|
|
|
|
|
} else {
|
|
|
|
|
tmp11 = cResult[5];
|
|
|
|
|
}
|
|
|
|
|
const tmpResult3 = tmp(504);
|
|
|
|
|
const stateFromStores1 = tmpResult3.useStateFromStores(tmp9, tmp11);
|
|
|
|
|
if (cResult[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
|
|
|
const items2 = [SelectedChannelStore];
|
|
|
|
|
cResult[6] = items2;
|
|
|
|
|
tmp13 = items2;
|
|
|
|
|
} else {
|
|
|
|
|
tmp13 = cResult[6];
|
|
|
|
|
}
|
|
|
|
|
if (cResult[7] !== arg1) {
|
|
|
|
|
class C {
|
|
|
|
|
constructor() {
|
|
|
|
|
return SelectedChannelStore.getVoiceChannelId() === closure_1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
cResult[7] = arg1;
|
|
|
|
|
cResult[8] = C;
|
|
|
|
|
tmp15 = C;
|
|
|
|
|
} else {
|
|
|
|
|
class C {
|
|
|
|
|
constructor() {
|
|
|
|
|
return SelectedChannelStore.getVoiceChannelId() === closure_1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const tmpResult4 = tmp(504);
|
|
|
|
|
const stateFromStores2 = tmpResult4.useStateFromStores(tmp13, tmp15);
|
|
|
|
|
if (cResult[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
|
|
|
class C {
|
|
|
|
|
constructor() {
|
|
|
|
|
return SelectedChannelStore.getVoiceChannelId() === closure_1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const items3 = [closure_3];
|
|
|
|
|
cResult[9] = items3;
|
|
|
|
|
} else {
|
|
|
|
|
class C {
|
|
|
|
|
constructor() {
|
|
|
|
|
return SelectedChannelStore.getVoiceChannelId() === closure_1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (cResult[10] === arg1) {
|
|
|
|
|
class C {
|
|
|
|
|
constructor() {
|
|
|
|
|
return SelectedChannelStore.getVoiceChannelId() === closure_1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const fn3 = function y() {
|
|
|
|
|
let previewURL;
|
|
|
|
|
let isPreviewLoading = !closure_3;
|
|
|
|
|
let shouldFetchPreviewResult = isPreviewLoading;
|
|
|
|
|
if (!closure_3) {
|
|
|
|
|
shouldFetchPreviewResult = ApplicationStreamPreviewStore.shouldFetchPreview(closure_0, closure_1, closure_2);
|
|
|
|
|
}
|
|
|
|
|
const obj = { shouldFetchPreview: shouldFetchPreviewResult, previewUrl: previewURL, isLoading: isPreviewLoading };
|
|
|
|
|
previewURL = null;
|
|
|
|
|
if (!closure_3) {
|
|
|
|
|
previewURL = ApplicationStreamPreviewStore.getPreviewURL(closure_0, closure_1, closure_2);
|
|
|
|
|
}
|
|
|
|
|
if (!closure_3) {
|
|
|
|
|
isPreviewLoading = ApplicationStreamPreviewStore.getIsPreviewLoading(closure_0, closure_1, closure_2);
|
|
|
|
|
}
|
|
|
|
|
return obj;
|
|
|
|
|
};
|
|
|
|
|
cResult[10] = arg1;
|
|
|
|
|
cResult[11] = arg0;
|
|
|
|
|
cResult[12] = null == arg1 || null == arg2;
|
|
|
|
|
cResult[13] = arg2;
|
|
|
|
|
cResult[14] = fn3;
|
2026-10-08 09:57:35 +00:00
|
|
|
}) : (function useFetchStreamPreview(arg0, arg1, arg2) {
|
2026-10-03 08:58:59 +00:00
|
|
|
let closure_0;
|
|
|
|
|
let closure_1;
|
|
|
|
|
let closure_2;
|
|
|
|
|
let isLoading;
|
|
|
|
|
let previewUrl;
|
|
|
|
|
let shouldFetchPreview;
|
|
|
|
|
_require = arg0;
|
|
|
|
|
dependencyMap = arg1;
|
|
|
|
|
react = arg2;
|
|
|
|
|
let tmp = null == arg1 || null == arg2;
|
|
|
|
|
let closure_3 = tmp;
|
|
|
|
|
let obj = require("get initialized");
|
2026-08-24 06:08:38 +00:00
|
|
|
const items = [closure_4];
|
2026-10-03 08:58:59 +00:00
|
|
|
closure_4 = obj.useStateFromStores(items, () => ChannelStore.getChannel(closure_1));
|
2026-07-23 10:11:24 +00:00
|
|
|
const items1 = [shouldFetchPreview];
|
2026-10-03 08:58:59 +00:00
|
|
|
const obj2 = require("get initialized");
|
|
|
|
|
let stateFromStores = obj2.useStateFromStores(items1, () => {
|
|
|
|
|
const canBasicChannelResult = null != closure_4 && PermissionStore.canBasicChannel(BasicPermissions.CONNECT, tmp);
|
2026-07-20 16:05:17 +00:00
|
|
|
return canBasicChannelResult;
|
|
|
|
|
});
|
2026-07-23 10:11:24 +00:00
|
|
|
const items2 = [stateFromStores];
|
2026-10-03 08:58:59 +00:00
|
|
|
const obj3 = require("get initialized");
|
|
|
|
|
const stateFromStores1 = obj3.useStateFromStores(items2, () => SelectedChannelStore.getVoiceChannelId() === closure_1);
|
2026-08-24 06:08:38 +00:00
|
|
|
const items3 = [closure_3];
|
2026-10-03 08:58:59 +00:00
|
|
|
const obj4 = require("get initialized");
|
|
|
|
|
const stateFromStoresObject = obj4.useStateFromStoresObject(items3, () => {
|
|
|
|
|
let previewURL;
|
2026-09-10 05:38:07 +00:00
|
|
|
let isPreviewLoading = !closure_3;
|
2026-07-29 08:29:29 +00:00
|
|
|
let shouldFetchPreviewResult = isPreviewLoading;
|
2026-09-10 05:38:07 +00:00
|
|
|
if (!closure_3) {
|
|
|
|
|
shouldFetchPreviewResult = ApplicationStreamPreviewStore.shouldFetchPreview(closure_0, closure_1, closure_2);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-10-03 08:58:59 +00:00
|
|
|
const obj = { shouldFetchPreview: shouldFetchPreviewResult, previewUrl: previewURL, isLoading: isPreviewLoading };
|
|
|
|
|
previewURL = null;
|
2026-09-10 05:38:07 +00:00
|
|
|
if (!closure_3) {
|
|
|
|
|
previewURL = ApplicationStreamPreviewStore.getPreviewURL(closure_0, closure_1, closure_2);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
if (!closure_3) {
|
|
|
|
|
isPreviewLoading = ApplicationStreamPreviewStore.getIsPreviewLoading(closure_0, closure_1, closure_2);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return obj;
|
|
|
|
|
});
|
2026-07-23 10:11:24 +00:00
|
|
|
shouldFetchPreview = stateFromStoresObject.shouldFetchPreview;
|
2026-07-20 16:05:17 +00:00
|
|
|
({ previewUrl, isLoading } = stateFromStoresObject);
|
|
|
|
|
if (!stateFromStores) {
|
|
|
|
|
stateFromStores = stateFromStores1;
|
|
|
|
|
}
|
2026-10-03 08:58:59 +00:00
|
|
|
const items4 = [shouldFetchPreview, arg1, arg0, arg2, tmp, stateFromStores];
|
|
|
|
|
const effect = react.useEffect(() => {
|
|
|
|
|
const tmp = shouldFetchPreview && !closure_3 && stateFromStores;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (tmp) {
|
2026-10-03 08:58:59 +00:00
|
|
|
const obj = StreamActionCreators;
|
|
|
|
|
const streamPreview = obj.fetchStreamPreview(closure_0, closure_1, closure_2);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}, items4);
|
2026-10-03 08:58:59 +00:00
|
|
|
if (!tmp) {
|
|
|
|
|
let obj5;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (stateFromStores) {
|
2026-10-03 08:58:59 +00:00
|
|
|
obj5 = { previewUrl, isLoading };
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
return obj5;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-10-09 10:00:15 +00:00
|
|
|
obj5 = { previewUrl: "Set", isLoading: true };
|
2026-10-03 08:58:59 +00:00
|
|
|
});
|
|
|
|
|
const result = size.fileFinishedImporting("modules/go_live/useFetchStreamPreview.tsx");
|
|
|
|
|
|
|
|
|
|
export default tmp2;
|