decord/source/modules/chat/useTypingText.tsx
2026-07-24 07:16:23 +00:00

142 lines
4.3 KiB
TypeScript

// Module ID: 11174
// Function ID: 86953
// Name: _createForOfIteratorHelperLoose
// Dependencies: [57, 1849, 566, 4319, 1212, 2]
// Exports: default
// Module 11174 (_createForOfIteratorHelperLoose)
import _slicedToArray from "_slicedToArray";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
const require = arg1;
function _createForOfIteratorHelperLoose(iterable) {
let closure_0 = iterable;
iterable = "undefined" !== typeof Symbol;
if (iterable) {
const _Symbol = Symbol;
iterable = iterable[Symbol.iterator];
}
if (!iterable) {
iterable = iterable[Symbol.iterator];
}
if (iterable) {
const iter = iterable.call(iterable);
const next = iter.next;
return next.bind(iter);
} else {
const _Array = Array;
let tmp = iterable;
if (!Array.isArray(iterable)) {
let tmp2;
if (iterable) {
if ("string" === typeof iterable) {
tmp2 = _arrayLikeToArray(iterable, undefined);
} else {
const toString = {}.toString;
const substr = toString.call(iterable).slice(8, -1);
let name = substr;
if (tmp3) {
name = iterable.constructor.name;
}
if ("Map" !== name) {
if ("Set" !== name) {
if ("Arguments" === name) {
let arr = _arrayLikeToArray(iterable, undefined);
} else {
let obj = /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/;
}
}
tmp2 = arr;
}
const _Array2 = Array;
arr = Array.from(iterable);
const callResult = toString.call(iterable);
tmp3 = "Object" === substr && iterable.constructor;
}
}
tmp = tmp2;
if (!tmp2) {
const _TypeError = TypeError;
const typeError = new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
throw typeError;
}
}
if (tmp) {
closure_0 = tmp;
}
let c1 = 0;
return () => {
if (closure_1 >= length.length) {
let obj = { done: true };
} else {
obj = { done: false };
closure_1 = tmp3 + 1;
obj.value = length[+closure_1];
}
return obj;
};
}
}
function _arrayLikeToArray(arg0, arg1) {
let length;
if (tmp) {
length = arg0.length;
}
const ArrayResult = Array(length);
for (let num = 0; num < length; num = num + 1) {
ArrayResult[num] = arg0[num];
}
return ArrayResult;
}
const result = require("initialize").fileFinishedImporting("modules/chat/useTypingText.tsx");
export default function useTypingText(channelId) {
channelId = channelId.channelId;
const guildId = channelId.guildId;
const typingUserIds = channelId.typingUserIds;
let obj = channelId(typingUserIds[2]);
let items = [_isNativeReflectConstruct];
const items1 = [channelId, guildId, typingUserIds];
let tmp = callback(obj.useStateFromStoresArray(items, () => {
let iter2;
const items = [];
const tmp = outer1_5(typingUserIds);
let iter = tmp();
if (!iter.done) {
do {
let tmp2 = outer1_4;
let user = outer1_4.getUser(iter.value);
if (null != user) {
let tmp4 = guildId;
let tmp5 = typingUserIds;
let obj = guildId(typingUserIds[3]);
let tmp6 = guildId;
let tmp7 = channelId;
let arr = items.push(obj.getName(guildId, channelId, user));
}
iter2 = tmp();
iter = iter2;
} while (!iter2.done);
}
return items;
}, items1), 4);
const first = tmp[0];
if (null == first) {
return null;
} else if (null == tmp3) {
const intl4 = channelId(typingUserIds[4]).intl;
obj = { a: first };
let formatResult = intl4.format(channelId(typingUserIds[4]).t.lJ9sZX, obj);
} else if (null == tmp4) {
const intl3 = channelId(typingUserIds[4]).intl;
obj = { a: first, b: tmp3 };
formatResult = intl3.format(channelId(typingUserIds[4]).t.rB0CUa, obj);
} else if (null == tmp5) {
const intl2 = channelId(typingUserIds[4]).intl;
const obj1 = { a: first, b: tmp3, c: tmp4 };
formatResult = intl2.format(channelId(typingUserIds[4]).t.StKThj, obj1);
} else {
const intl = channelId(typingUserIds[4]).intl;
formatResult = intl.string(channelId(typingUserIds[4]).t.uVDhqZ);
}
};