Files
discord-decomp/sources/by-id/module-07136.js
T
2026-07-28 01:06:53 +03:00

150 lines
5.0 KiB
JavaScript

/* Metro module 7136; source: unknown; dependencies: [7135] */
import * as Module07135Module from './module-07135.js'; /* Metro dependency 7135 */
function _fun57104(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7314:6, offset: 0x013dc925, size: 136 bytes, params: 8, frame: 13
const closure = function(a0) {
this.data = a0;
this.left = null;
this.right = null;
};
const closure2 = function(a0) {
this._root = null;
this._comparator = a0;
this.size = 0;
};
closure.prototype.get_child = function(a0) {
return a0 ? this.right : this.left;
};
closure.prototype.set_child = function(a0, a1) {
if (a0) {
this.right = a1;
} else {
this.left = a1;
}
};
let value = Module07135Module;
value = new value();
closure2.prototype = value;
closure2.prototype.insert = insert_57109;
closure2.prototype.remove = remove_57110;
module.exports = closure2;
function insert_57109(a0) { // fn#57109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7314:348, offset: 0x013dc9ca, size: 234 bytes, params: 2, frame: 20
var _comparator;
var data;
var value3;
var get_child;
var value4;
var size;
let _root = this._root;
let value = null;
if (value === _root) {
this._root = new Node_57105(a0);
size = this.size;
this.size = typeof size === 'bigint' ? size + 1n : +size + 1;
return true;
}
_root = this._root;
const value2 = 0;
let r0 = value;
let r2 = value2;
let r7 = _root;
loopExit2: while (true) {
if (value === r7) {
value = environment;
r0.set_child(r2, new Node_57105(a0));
global.ret = true;
size = this.size;
this.size = typeof size === 'bigint' ? size + 1n : +size + 1;
return true;
}
_comparator = this._comparator;
data = r7.data;
if (value2 === Reflect.apply(_comparator, this, [data, a0])) {
break loopExit2;
}
_comparator = this._comparator;
data = r7.data;
value3 = Reflect.apply(_comparator, this, [data, a0]) < value2;
get_child = r7.get_child;
value4 = Reflect.apply(get_child, r7, [value3]);
r0 = r7;
r2 = value3;
r7 = value4;
}
return false;
}
function remove_57110(a0) { // fn#57110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7314:655, offset: 0x013dcab4, size: 257 bytes, params: 2, frame: 25
var r3;
var r5;
var r8;
var r4;
var r6;
var r7;
var r0;
var value7;
var _comparator;
var data;
var value8;
var value9;
var set_child;
var right;
var size;
const _root = this._root;
let value = null;
if (value === _root) {
return false;
}
const node_57105 = new Node_57105(undefined);
node_57105.right = this._root;
const value5 = 1;
if (value === node_57105.get_child(value5)) {
r4 = value;
r6 = value;
r7 = node_57105;
} else {
r3 = value5;
r5 = value;
r8 = node_57105;
while (true) {
value7 = r8.get_child(r3);
_comparator = this._comparator;
data = value7.data;
value8 = Reflect.apply(_comparator, this, [a0, data]);
value9 = value8 > 0;
r5 = value8 === 0 ? value7 : r5;
get_child = value7.get_child;
if (value !== Reflect.apply(get_child, value7, [value9])) {
r3 = value9;
r8 = value7;
continue;
}
r4 = r5;
r6 = r8;
r7 = value7;
break;
}
}
const value10 = value !== r4;
if (value10) {
r4.data = r7.data;
set_child = r6.set_child;
right = r6.right;
value = r7.get_child(value === r7.left);
Reflect.apply(set_child, r6, [right === r7, value]);
right = node_57105.right;
this._root = right;
size = this.size;
this.size = typeof size === 'bigint' ? size - 1n : +size - 1;
value = true;
r0 = value;
} else {
r0 = value10;
}
return r0;
}
}
global.__d(_fun57104, 7136, [7135]) /* metro module 7136, dependencies: [7135] */;