Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
62 lines
1.7 KiB
TypeScript
62 lines
1.7 KiB
TypeScript
// Module ID: 7396
|
|
// Function ID: 7397
|
|
// Name: GuildChannelSubscriptions
|
|
// Dependencies: [1438, 12, 2]
|
|
|
|
// Module 7396 (GuildChannelSubscriptions)
|
|
import _modDef12 from "module_12" /* 12 */;
|
|
import privDefault from "priv" /* 1438 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
let result = size.fileFinishedImporting("lib/guild/GuildChannelSubscriptions.tsx");
|
|
class GuildChannelSubscriptions {
|
|
constructor(arg0) {
|
|
merged = Object.assign({ _subscriptions: null });
|
|
merged[0] = {};
|
|
merged._onChange = global;
|
|
return merged;
|
|
}
|
|
}
|
|
const prototype = GuildChannelSubscriptions.prototype;
|
|
prototype["reset"] = function reset() {
|
|
this._subscriptions = {};
|
|
};
|
|
prototype["get"] = function get(arg0) {
|
|
const obj = {};
|
|
const item = this._get(arg0).forEach((item, index) => {
|
|
obj2[index] = item;
|
|
});
|
|
return obj;
|
|
};
|
|
prototype["_get"] = function _get(arg0) {
|
|
let tmp = this._subscriptions[arg0];
|
|
if (tmp == null) {
|
|
tmp = new privDefault({ max: 5 });
|
|
}
|
|
return tmp;
|
|
};
|
|
prototype["clear"] = function clear(arg0) {
|
|
delete tmp2[tmp];
|
|
};
|
|
prototype["subscribe"] = function subscribe(arg0, arg1, arg2) {
|
|
const self = this;
|
|
const _getResult = this._get(arg0);
|
|
const isEqualResult = _modDef12.isEqual(_getResult.get(arg1), arg2);
|
|
let flag = !isEqualResult;
|
|
if (!isEqualResult) {
|
|
const result = _getResult.set(arg1, arg2);
|
|
self._subscriptions[arg0] = _getResult;
|
|
const obj2 = {};
|
|
const item = _getResult.forEach((item, index) => {
|
|
obj2[index] = item;
|
|
});
|
|
self._onChange(arg0, obj2);
|
|
flag = true;
|
|
}
|
|
return flag;
|
|
};
|
|
const items = [[0, 99]];
|
|
|
|
export default GuildChannelSubscriptions;
|
|
export const MINIMUM_RANGE = 100;
|
|
export const DEFAULT_RANGES = items;
|