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

395 lines
18 KiB
JavaScript

/* Metro module 375; source: unknown; dependencies: [6, 7, 15, 17, 102, 18, 99, 100, 31, 358, 357] */
import ClassCallCheck from './module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from './module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from './module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from './module-00017.js'; /* Metro dependency 17 */
import Inherits from './module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00099 from './module-00099.js'; /* Metro dependency 99 */
import Module00100 from './module-00100.js'; /* Metro dependency 100 */
import Module00102 from './module-00102.js'; /* Metro dependency 102 */
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
function _fun5570(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#5570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:6, offset: 0x00ce01ce, size: 295 bytes, params: 8, frame: 19
const isPlainObject_55762 = isPlainObject_5576;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_10 = Module00100('nodes');
exports.default = _fun5580(importDefault(357) /* metro dependency 357 */);
exports.isPlainObject = isPlainObject_55762;
function _isNativeReflectConstruct_5571() { // fn#5571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:205, offset: 0x00ce02f5, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_5571_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _superPropGet_5574(a0, a1, a2, a3) { // fn#5574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:424, offset: 0x00ce0353, size: 99 bytes, params: 5, frame: 18
let value = a0;
const env0_0 = a2;
value = Module00017(1 & 3 ? value.prototype : value);
value = Module00102(value, a1, a2);
return 2 & 3 ? typeof value !== 'function' ? value : _fun5575 : value;
function _fun5575(a0) { // fn#5575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:523, offset: 0x00c62408, size: 27 bytes, params: 2, frame: 13
return env0_1.apply(importDefault, a0);
}
}
function isPlainObject_5576(a0) { // fn#5576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:558, offset: 0x00ce03b6, size: 84 bytes, params: 2, frame: 13
var Object;
var isPrototypeOf;
let value = a0 !== null;
let r0 = value && typeof a0 === 'object';
if (r0) {
Object = global.Object;
value = Object.getPrototypeOf(a0);
isPrototypeOf = value.isPrototypeOf;
Object = global.Object;
value = Reflect.apply(isPrototypeOf, value, [Object]);
r0 = value;
}
r0 = r0 && !isValidElement(a0);
return r0;
}
function flatAnimatedNodes(a0) { // fn#5577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:675, offset: 0x00ce040a, size: 260 bytes, params: 2, frame: 23
var r0;
var r4;
var r1;
var r5;
var value;
var value2;
var Array;
var Object;
var keys;
var value4;
var length;
var flatAnimatedNodesBinding;
var property;
reducibleJoin4: while (true) {
reducibleJoin2: while (true) {
if (arguments.length > 1) {
if (arguments[1] !== undefined) {
value = arguments[1];
r0 = value;
break reducibleJoin4;
}
break reducibleJoin2;
}
break reducibleJoin2;
}
r0 = [];
break reducibleJoin4;
}
value = 0;
reducibleJoin7: while (true) {
if (arguments.length > 2) {
if (arguments[2] === undefined) {
r4 = value;
break reducibleJoin7;
}
value2 = arguments[2];
r4 = value2;
break reducibleJoin7;
}
r4 = value;
break reducibleJoin7;
}
if (!(r4 >= 5)) {
if (a0 instanceof (importDefault(358) /* metro dependency 358 */)) {
r0.push(a0);
} else {
Array = global.Array;
if (Array.isArray(a0)) {
length = a0.length;
if (value < length) {
r5 = value;
reducibleLoop14: while (true) {
flatAnimatedNodesBinding = flatAnimatedNodes;
property = a0[r5];
flatAnimatedNodesBinding(property, r0, r4 + 1);
value = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (value < length) {
r5 = value;
continue reducibleLoop14;
}
break reducibleLoop14;
}
}
} else {
reducibleJoin16: while (true) {
if (!isPlainObject_5576(a0)) {
break reducibleJoin16;
}
Object = global.Object;
keys = Object.keys;
value4 = Reflect.apply(keys, Object, [a0]);
length = value4.length;
if (!(value < length)) {
break reducibleJoin16;
}
r1 = value;
reducibleLoop12: while (true) {
flatAnimatedNodesBinding = flatAnimatedNodes;
property = a0[value4[r1]];
flatAnimatedNodesBinding(property, r0, r4 + 1);
value = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
if (value < length) {
r1 = value;
continue reducibleLoop12;
}
break reducibleJoin16;
}
}
}
}
}
return r0;
}
function mapAnimatedNodes(a0, a1) { // fn#5578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:1082, offset: 0x00ce050e, size: 226 bytes, params: 3, frame: 25
var r9;
var r10;
var value2;
var object;
var value4;
var length;
var property;
var mapAnimatedNodesBinding;
var property2;
const env0_0 = a1;
let value = 0;
reducibleJoin3: while (true) {
if (arguments.length > 2) {
if (arguments[2] === undefined) {
r9 = value;
break reducibleJoin3;
}
value2 = arguments[2];
r9 = value2;
break reducibleJoin3;
}
r9 = value;
break reducibleJoin3;
}
if (!(r9 >= 5)) {
if (a0 instanceof (importDefault(358) /* metro dependency 358 */)) {
return a1(a0);
}
var Array = global.Array;
if (Array.isArray(a0)) {
return a0.map(_fun5579);
}
if (isPlainObject_5576(a0)) {
object = {};
value4 = global.Object.keys(a0);
length = value4.length;
if (value < length) {
r10 = value;
reducibleLoop9: while (true) {
property = value4[r10];
mapAnimatedNodesBinding = mapAnimatedNodes;
property2 = a0[property];
object[property] = mapAnimatedNodesBinding(property2, a1, r9 + 1);
value = typeof r10 === 'bigint' ? r10 + 1n : +r10 + 1;
if (value < length) {
r10 = value;
continue reducibleLoop9;
}
break reducibleLoop9;
}
}
return object;
}
}
return a0;
function _fun5579(a0) { // fn#5579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:1263, offset: 0x00ce05f0, size: 39 bytes, params: 2, frame: 15
return mapAnimatedNodes(a0, require, env0_1 + 1);
}
}
function _fun5580(a0) { // fn#5580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:1468, offset: 0x00ce0617, size: 234 bytes, params: 2, frame: 17
const AnimatedObject2 = AnimatedObject;
Inherits(AnimatedObject2, a0);
return CreateClass(AnimatedObject2, [{key: '__getValue', value: function() {
return mapAnimatedNodes(this._value, _fun5583);
}}, {key: '__getValueWithStaticObject', value: value_5584}, {key: '__getAnimatedValue', value: function() {
return mapAnimatedNodes(this._value, _fun5587);
}}, {key: '__attach', value: value_5588}, {key: '__detach', value: value_5589}, {key: '__makeNative',
value: value_5590}, {key: '__getNativeConfig', value: function() {
var object = {type: 'object'};
object.value = mapAnimatedNodes(this._value, _fun5592);
object.debugID = this.__getDebugID();
return object;
}}], [{key: 'from', value: value_5593}]);
function AnimatedObject(a0, a1, a2) { // fn#5581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:1480, offset: 0x00ce0701, size: 178 bytes, params: 4, frame: 20
const value = environment.__proto__;
let binding = env1_2;
binding(this, AnimatedObject);
const items2 = [a2];
const value3 = env1_5(AnimatedObject);
const value6 = env1_4(this, _isNativeReflectConstruct_5571() ? global.Reflect.construct(value3, items2,
env1_5(this).constructor) : value3.apply(this, items2));
const Object = global.Object;
const defineProperty = Object.defineProperty;
binding = env1_10;
Reflect.apply(defineProperty, Object, [value6, binding, {writable: true, value: undefined}]);
env1_8(value6, binding)[binding] = a0;
value6._value = a1;
return value6;
}
function value_5582() { // fn#5582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:1854, offset: 0x00ce07b3, size: 33 bytes, params: 1, frame: 13
return mapAnimatedNodes(this._value, function(a0) {
return a0.__getValue();
});
}
function value_5584(a0) { // fn#5584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:1992, offset: 0x00ce07e3, size: 58 bytes, params: 2, frame: 15
const binding = env1_8;
const binding2 = env1_10;
const env0_0 = binding(this, binding2)[binding2];
return mapAnimatedNodes(a0, _fun5585);
function _fun5585() { // fn#5585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:2081, offset: 0x00ce081d, size: 37 bytes, params: 1, frame: 11
const binding = env0_0;
const binding2 = env0_1;
const value2 = typeof binding2 === 'bigint' ? binding2 : +binding2;
env0_1 = typeof value2 === 'bigint' ? value2 + 1n : +value2 + 1;
return binding[value2].__getValue();
}
}
function value_5586() { // fn#5586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:2156, offset: 0x00ce0842, size: 33 bytes, params: 1, frame: 13
return mapAnimatedNodes(this._value, function(a0) {
return a0.__getAnimatedValue();
});
}
function value_5588() { // fn#5588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:2292, offset: 0x00ce0872, size: 100 bytes, params: 1, frame: 19
var r2;
var property2;
var value3;
const value = environment.__proto__;
const binding = env1_8;
const binding2 = env1_10;
const property = binding(this, binding2)[binding2];
const length = property.length;
const value2 = 0;
if (value2 < length) {
for (r2 = value2; true; r2 = value3) {
property2 = property[r2];
property2.__addChild(this);
value3 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (!(value3 < length)) {
break;
}
}
}
_superPropGet_5574(AnimatedObject, '__attach', this, 3)([]);
}
function value_5589() { // fn#5589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:2457, offset: 0x00ce08d6, size: 100 bytes, params: 1, frame: 19
var r2;
var property2;
var value3;
const value = environment.__proto__;
const binding = env1_8;
const binding2 = env1_10;
const property = binding(this, binding2)[binding2];
const length = property.length;
const value2 = 0;
if (value2 < length) {
for (r2 = value2; true; r2 = value3) {
property2 = property[r2];
property2.__removeChild(this);
value3 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (!(value3 < length)) {
break;
}
}
}
_superPropGet_5574(AnimatedObject, '__detach', this, 3)([]);
}
function value_5590(a0) { // fn#5590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:2629, offset: 0x00ce093a, size: 107 bytes, params: 2, frame: 20
var r2;
var property2;
var value3;
const value = environment.__proto__;
const binding = env1_8;
const binding2 = env1_10;
const property = binding(this, binding2)[binding2];
const length = property.length;
const value2 = 0;
if (value2 < length) {
for (r2 = value2; true; r2 = value3) {
property2 = property[r2];
property2.__makeNative(a0);
value3 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (!(value3 < length)) {
break;
}
}
}
_superPropGet_5574(AnimatedObject, '__makeNative', this, 3)([a0]);
}
function value_5591() { // fn#5591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:2812, offset: 0x00ce09a5, size: 62 bytes, params: 1, frame: 15
const object = {type: 'object'};
object.value = mapAnimatedNodes(this._value, function(a0) {
return {nodeTag: a0.__getNativeTag()};
});
object.debugID = this.__getDebugID();
return object;
}
function value_5593(a0) { // fn#5593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:2999, offset: 0x00ce09f9, size: 65 bytes, params: 2, frame: 14
return flatAnimatedNodes(a0).length === 0 ? null : new AnimatedObject(environment.__proto__, a0);
}
}
}
function _fun5583(a0) { // fn#5583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:1913, offset: 0x00ce07d4, size: 15 bytes, params: 2, frame: 9
return a0.__getValue();
}
function _fun5587(a0) { // fn#5587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:2223, offset: 0x00ce0863, size: 15 bytes, params: 2, frame: 9
return a0.__getAnimatedValue();
}
function _fun5592(a0) { // fn#5592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:416:2898, offset: 0x00ce09e3, size: 22 bytes, params: 2, frame: 10
const object = {};
object.nodeTag = a0.__getNativeTag();
return object;
}
global.__d(_fun5570, 375, [6, 7, 15, 17, 102, 18, 99, 100, 31, 358,
357]) /* metro module 375, dependencies: [6, 7, 15, 17, 102, 18, 99, 100, 31, 358, 357] */;