2026-09-05 10:56:28 +00:00
|
|
|
// Module ID: 7287
|
|
|
|
|
// Function ID: 7288
|
2026-07-29 08:29:29 +00:00
|
|
|
// Name: reset
|
2026-09-05 10:56:28 +00:00
|
|
|
// Dependencies: [1437, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-09-05 10:56:28 +00:00
|
|
|
// Module 7287 (reset)
|
2026-08-24 06:08:38 +00:00
|
|
|
import set2 from "set" /* 2 */;
|
2026-09-05 10:56:28 +00:00
|
|
|
import privDefault from "priv" /* 1437 */;
|
2026-08-24 06:08:38 +00:00
|
|
|
|
|
|
|
|
let result = set2.fileFinishedImporting("lib/guild/GuildThreadSubscriptions.tsx");
|
2026-07-29 08:29:29 +00:00
|
|
|
class GuildThreadSubscriptions {
|
|
|
|
|
constructor(arg0) {
|
|
|
|
|
obj = Object.create(new.target.prototype);
|
|
|
|
|
obj[0] = {};
|
|
|
|
|
obj._onChange = global;
|
|
|
|
|
return obj;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
const prototype = GuildThreadSubscriptions.prototype;
|
|
|
|
|
prototype["reset"] = function reset() {
|
|
|
|
|
this._subscriptions = {};
|
|
|
|
|
};
|
|
|
|
|
prototype["get"] = function get(arg0) {
|
|
|
|
|
return this._get(arg0).keys();
|
|
|
|
|
};
|
|
|
|
|
prototype["getSubscribedThreadIds"] = function getSubscribedThreadIds() {
|
|
|
|
|
const set = new Set();
|
|
|
|
|
for (const key10010 in this._subscriptions) {
|
|
|
|
|
let tmp3 = key10010;
|
|
|
|
|
let obj2 = this._subscriptions[key10010];
|
|
|
|
|
let keys = obj2.keys();
|
|
|
|
|
let tmp5 = keys;
|
|
|
|
|
let tmp = keys;
|
|
|
|
|
for (const item10012 of keys) {
|
|
|
|
|
let addResult = set.add(item10012);
|
|
|
|
|
continue;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
return set;
|
|
|
|
|
};
|
|
|
|
|
prototype["_get"] = function _get(arg0) {
|
|
|
|
|
let tmp = this._subscriptions[arg0];
|
|
|
|
|
if (tmp == null) {
|
2026-08-24 06:08:38 +00:00
|
|
|
tmp = new privDefault({ max: 3, updateAgeOnGet: true });
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
return tmp;
|
|
|
|
|
};
|
|
|
|
|
prototype["clear"] = function clear(arg0) {
|
|
|
|
|
const self = this;
|
|
|
|
|
if (arg0 in this._subscriptions) {
|
|
|
|
|
const _subscriptions = self._subscriptions;
|
|
|
|
|
delete tmp[tmp2];
|
|
|
|
|
self._onChange(arg0, []);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
};
|
|
|
|
|
prototype["subscribe"] = function subscribe(arg0, arg1, arg2) {
|
|
|
|
|
const self = this;
|
|
|
|
|
const _getResult = this._get(arg0);
|
|
|
|
|
if (_getResult.has(arg1)) {
|
|
|
|
|
const _Date3 = Date;
|
|
|
|
|
const result = _getResult.set(arg1, Date.now());
|
|
|
|
|
let flag = false;
|
|
|
|
|
} else {
|
|
|
|
|
if (tmp3) {
|
|
|
|
|
const _Date = Date;
|
|
|
|
|
const result1 = _getResult.set(arg2, Date.now());
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
const _Date2 = Date;
|
|
|
|
|
const result2 = _getResult.set(arg1, Date.now());
|
|
|
|
|
self._subscriptions[arg0] = _getResult;
|
|
|
|
|
self._onChange(arg0, _getResult.keys());
|
|
|
|
|
flag = true;
|
|
|
|
|
tmp3 = null != arg2 && _getResult.has(arg2);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
return flag;
|
|
|
|
|
};
|
|
|
|
|
prototype["unsubscribe"] = function unsubscribe(arg0, arg1) {
|
|
|
|
|
const self = this;
|
|
|
|
|
if (arg0 in this._subscriptions) {
|
|
|
|
|
let flag2 = obj.has(arg1);
|
|
|
|
|
if (flag2) {
|
|
|
|
|
obj.del(arg1);
|
|
|
|
|
self._onChange(arg0, obj.keys());
|
|
|
|
|
flag2 = true;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
return flag2;
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
};
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
export default GuildThreadSubscriptions;
|