decord/source/modules/user_profile/WidgetAssetUtils.tsx
2026-09-03 10:05:34 +00:00

36 lines
959 B
TypeScript

// Module ID: 8807
// Function ID: 8808
// Name: getWidgetAssetURL
// Dependencies: [673, 1430, 2]
// Exports: getWidgetAssetURL
// Module 8807 (getWidgetAssetURL)
import set from "set" /* 2 */;
import ME from "ME" /* 673 */;
import getAvatarURL from "getAvatarURL" /* 1430 */;
const DEFAULT_CDN_HOST = ME.DEFAULT_CDN_HOST;
const result = set.fileFinishedImporting("modules/user_profile/WidgetAssetUtils.tsx");
export const getWidgetAssetURL = function getWidgetAssetURL(arg0, fileId, arg2) {
let obj = arg2;
if (arg2 === undefined) {
obj = {};
}
let flag = obj.animated;
if (flag === undefined) {
flag = false;
}
if (CDN_HOST == null) {
CDN_HOST = DEFAULT_CDN_HOST;
}
let str = "webp";
if (!getAvatarURL.SUPPORTS_WEBP) {
let str2 = "png";
if (flag) {
str2 = "gif";
}
str = str2;
}
return "https://" + CDN_HOST + "/widget-assets/" + arg0 + "/" + fileId + "?format=" + str + "&animated=" + flag;
};