Files
discord-decomp/sources/by-id/module-00347.jsx
T
2026-07-27 16:20:00 +03:00

429 lines
19 KiB
React

/* Metro module 347; source: unknown; dependencies: [6, 7, 15, 17, 102, 18, 99, 100, 348, 354, 359, 357] */
function _fun5136(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#5136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:6, offset: 0x00cd5f04, size: 298 bytes, params: 8, frame: 19
let closure = function(a0) {
var Set = global.Set;
var value2 = new Set();
var env0_0 = value2;
var closure = _fun5143;
var env0_1 = closure;
closure(a0);
value2.forEach(_fun5144);
};
const _executeAsAnimatedBatch = function(a0, a1) {
var API = importDefault(dependencyMap[8]).API;
API.setWaitingForIdentifier(a0);
a1();
API = importDefault(dependencyMap[8]).API;
API.unsetWaitingForIdentifier(a0);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(102) /* metro dependency 102 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const env0_8 = importDefault(99) /* metro dependency 99 */;
const value = importDefault(100) /* metro dependency 100 */;
const env0_9 = value('listenerCount');
const env0_10 = value('updateSubscription');
const env0_11 = value('ensureUpdateSubscriptionExists');
exports.default = _fun5149(importDefault(357) /* metro dependency 357 */);
exports.flushValue = closure;
}
function _isNativeReflectConstruct_5137() { // fn#5137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:179, offset: 0x00cd602e, 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_5137_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _superPropGet_5140(a0, a1, a2, a3) { // fn#5140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:398, offset: 0x00cd608c, size: 99 bytes, params: 5, frame: 18
let value = a0;
const env0_0 = a2;
const binding = env0_6;
value = env0_5(1 & 3 ? value.prototype : value);
value = binding(value, a1, a2);
return 2 & 3 ? typeof value !== 'function' ? value : _fun5141 : value;
}
function flushValue(a0) { // fn#5142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:532, offset: 0x00cd60ef, size: 70 bytes, params: 2, frame: 13
const Set = global.Set;
const set = new Set();
findAnimatedStyles(a0);
set.forEach(function(a0) {
return a0.update();
});
}
function _ensureUpdateSubscriptionExists2() { // fn#5146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:5125, offset: 0x00cd61da, size: 174 bytes, params: 1, frame: 19
var value4;
let binding = env0_8;
if (binding(this, env0_10)[env0_10] == null) {
(importDefault(348) /* metro dependency 348 */).API.startListeningToAnimatedNodeValue(this.__getNativeTag());
var env0_2 = (importDefault(348) /* metro dependency 348 */).nativeEventEmitter.addListener('onAnimatedValueUpdate',
_fun5147);
binding = env0_8;
value4 = binding(this, env0_10);
binding = env0_10;
value4[binding] = {remove: remove_5148};
}
}
function _fun5149(a0) { // fn#5149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:945, offset: 0x00cd6335, size: 482 bytes, params: 2, frame: 16
const closure = AnimatedValue;
env0_7(closure, a0);
return env0_3(closure, [{key: '__detach', value: value_5151}, {key: '__getValue', value: function() {
return this._value + this._offset;
}}, {key: '__makeNative', value: value_5154}, {key: 'addListener', value: value_5155}, {key: 'removeListener',
value: value_5156}, {key: 'removeAllListeners', value: value_5157}, {key: 'setValue', value: value_5158},
{key: 'setOffset', value: value_5160}, {key: 'flattenOffset', value: value_5161}, {key: 'extractOffset',
value: value_5162}, {key: 'stopAnimation', value: value_5164}, {key: 'resetAnimation', value: value_5165},
{key: '__onAnimatedValueUpdateReceived', value: function(a0, a1) {
this._updateValue(a0, false);
if (a1 != null) {
this._offset = a1;
}
}}, {key: 'interpolate', value: value_5167}, {key: 'animate', value: value_5168}, {key: 'stopTracking',
value: function() {
if (this._tracking) {
this._tracking.__detach();
}
this._tracking = null;
}}, {key: 'track', value: function(a0) {
this.stopTracking();
this._tracking = a0;
if (this._tracking) {
this._tracking.update();
}
}}, {key: '_updateValue', value: value_5173}, {key: '__getNativeConfig', value: function() {
return {type: 'value', value: this._value, offset: this._offset, debugID: this.__getDebugID()};
}}]);
}
function findAnimatedStyles(a0) { // fn#5143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:570, owner: flushValue.findAnimatedStyles, offset: 0x00cd6135, size: 70 bytes, params: 2, frame: 12
var value;
if (typeof a0.update === 'function') {
env0_0.add(a0);
} else {
value = a0.__getChildren();
value.forEach(findAnimatedStyles);
}
}
function _fun5147(a0) { // fn#5147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:5350, offset: 0x00cd6288, size: 50 bytes, params: 2, frame: 13
var binding;
if (a0.tag === env0_1) {
binding = env0_0;
binding.__onAnimatedValueUpdateReceived(a0.value, a0.offset);
}
}
function _ensureUpdateSubscriptionExists2Remove() { // fn#5148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:5449, owner: _ensureUpdateSubscriptionExists2.remove, offset: 0x00cd62ba, size: 123 bytes, params: 1, frame: 16
let binding = env1_8;
if (binding(env0_0, env1_10)[env1_10] != null) {
binding = env1_8;
binding(env0_0, env1_10)[env1_10] = null;
binding = env0_2;
binding.remove();
(importDefault(348) /* metro dependency 348 */).API.stopListeningToAnimatedNodeValue(env0_1);
}
}
function AnimatedValue(a0, a1) { // fn#5150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:957, offset: 0x00cd6517, size: 358 bytes, params: 3, frame: 22
const value = a1;
let binding = env1_2;
binding(this, AnimatedValue);
const items = [value];
const value4 = env1_5(AnimatedValue);
const value7 = env1_4(this, _isNativeReflectConstruct_5137() ? global.Reflect.construct(value4, items,
env1_5(this).constructor) : value4.apply(this, items));
let Object = global.Object;
Object.defineProperty(value7, env1_11, {value: _ensureUpdateSubscriptionExists2});
Object = global.Object;
Object.defineProperty(value7, env1_9, {writable: true, value: undefined});
Object = global.Object;
Object.defineProperty(value7, env1_10, {writable: true, value: undefined});
if (typeof a0 !== 'number') {
throw new global.Error('AnimatedValue: Attempting to set value to undefined');
}
binding = env1_8;
const binding2 = env1_9;
binding(value7, binding2)[binding2] = 0;
env1_8(value7, env1_10)[env1_10] = null;
value7._value = a0;
value7._startingValue = a0;
value7._offset = 0;
value7._animation = null;
if (value && value.useNativeDriver) {
value7.__makeNative();
}
return value7;
}
function value_5151() { // fn#5151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:1638, offset: 0x00cd667d, size: 129 bytes, params: 1, frame: 17
var environment;
var value;
var API;
var getValue;
if (this.__isNative) {
value = environment.__proto__;
API = (importDefault(348) /* metro dependency 348 */).API;
getValue = API.getValue;
value = this.__getNativeTag();
Reflect.apply(getValue, API, [value, _fun5152]);
}
this.stopAnimation();
value = environment.__proto__;
_superPropGet_5140(AnimatedValue, '__detach', this, 3)([]);
}
function value_5154(a0) { // fn#5154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:1946, offset: 0x00cd6731, size: 99 bytes, params: 2, frame: 18
var binding3;
const value = environment.__proto__;
_superPropGet_5140(AnimatedValue, '__makeNative', this, 3)([a0]);
let binding = env1_8;
const binding2 = env1_9;
if (binding(this, binding2)[binding2] > 0) {
binding = env1_8;
binding3 = env1_11;
binding(this, binding3)[binding3]();
}
}
function value_5155(a0) { // fn#5155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:2085, offset: 0x00cd6794, size: 109 bytes, params: 2, frame: 18
var binding3;
const value = environment.__proto__;
const value4 = _superPropGet_5140(AnimatedValue, 'addListener', this, 3)([a0]);
let binding = env1_8;
const binding2 = env1_9;
const value5 = binding(this, binding2);
const property = value5[binding2];
value5[binding2] = typeof property === 'bigint' ? property + 1n : +property + 1;
if (this.__isNative) {
binding = env1_8;
binding3 = env1_11;
binding(this, binding3)[binding3]();
}
return value4;
}
function value_5156(a0) { // fn#5156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:2256, offset: 0x00cd6801, size: 152 bytes, params: 2, frame: 18
_superPropGet_5140(AnimatedValue, 'removeListener', this, 3)([a0]);
const binding = env1_8;
const binding2 = env1_9;
const value4 = binding(this, binding2);
let property = value4[binding2];
value4[binding2] = typeof property === 'bigint' ? property - 1n : +property - 1;
if (this.__isNative && env1_8(this, env1_9)[env1_9] === 0) {
property = env1_8(this, env1_10)[env1_10];
if (property != null) {
property.remove();
}
}
}
function value_5157() { // fn#5157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:2470, offset: 0x00cd6899, size: 113 bytes, params: 1, frame: 18
var property;
_superPropGet_5140(AnimatedValue, 'removeAllListeners', this, 3)([]);
const binding = env1_8;
const binding2 = env1_9;
binding(this, binding2)[binding2] = 0;
if (this.__isNative) {
property = env1_8(this, env1_10)[env1_10];
if (property != null) {
property.remove();
}
}
}
function value_5158(a0) { // fn#5158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:2662, offset: 0x00cd690a, size: 122 bytes, params: 2, frame: 14
var environment;
var value;
var _executeAsAnimatedBatchBinding;
const env0_0 = a0;
if (this._animation) {
this._animation.stop();
this._animation = null;
}
this._updateValue(a0, !this.__isNative);
if (this.__isNative) {
value = environment.__proto__;
_executeAsAnimatedBatchBinding = _executeAsAnimatedBatch;
value = this.__getNativeTag();
value = value.toString();
_executeAsAnimatedBatchBinding(value, _fun5159);
}
}
function value_5160(a0) { // fn#5160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:2971, offset: 0x00cd69c6, size: 78 bytes, params: 2, frame: 14
var value;
var API;
this._offset = a0;
if (this.__isNative) {
value = environment.__proto__;
API = (importDefault(348) /* metro dependency 348 */).API;
API.setAnimatedNodeOffset(this.__getNativeTag(), a0);
}
}
function value_5161() { // fn#5161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:3113, offset: 0x00cd6a14, size: 98 bytes, params: 1, frame: 12
var value;
var API;
this._value = this._value + this._offset;
this._offset = 0;
if (this.__isNative) {
value = environment.__proto__;
API = (importDefault(348) /* metro dependency 348 */).API;
API.flattenAnimatedNodeOffset(this.__getNativeTag());
}
}
function value_5162() { // fn#5162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:3286, offset: 0x00cd6a76, size: 91 bytes, params: 1, frame: 13
var environment;
var value;
var _executeAsAnimatedBatchBinding;
this._offset = this._offset + this._value;
this._value = 0;
if (this.__isNative) {
value = environment.__proto__;
_executeAsAnimatedBatchBinding = _executeAsAnimatedBatch;
value = this.__getNativeTag();
value = value.toString();
_executeAsAnimatedBatchBinding(value, _fun5163);
}
}
function value_5164(a0) { // fn#5164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:3545, offset: 0x00cd6b0e, size: 137 bytes, params: 2, frame: 14
var value;
var API;
this.stopTracking();
if (this._animation) {
this._animation.stop();
}
this._animation = null;
if (a0) {
if (this.__isNative) {
value = environment.__proto__;
API = (importDefault(348) /* metro dependency 348 */).API;
API.getValue(this.__getNativeTag(), a0);
} else {
a0(this.__getValue());
}
}
}
function value_5165(a0) { // fn#5165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:3770, offset: 0x00cd6b97, size: 101 bytes, params: 2, frame: 13
var value;
var API;
var setAnimatedNodeValue;
this.stopAnimation(a0);
this._value = this._startingValue;
if (this.__isNative) {
value = environment.__proto__;
API = (importDefault(348) /* metro dependency 348 */).API;
setAnimatedNodeValue = API.setAnimatedNodeValue;
value = this.__getNativeTag();
Reflect.apply(setAnimatedNodeValue, API, [value, this._startingValue]);
}
}
function value_5167(a0) { // fn#5167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:4114, offset: 0x00cd6c23, size: 53 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = importDefault(354) /* metro dependency 354 */;
const value2 = Object.create(value.prototype, {constructor: {value: value}});
value = new value(this, a0);
return value instanceof Object ? value : value2;
}
function value_5168(a0, a1) { // fn#5168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:4189, offset: 0x00cd6c58, size: 148 bytes, params: 3, frame: 19
var environment;
var value;
const env0_0 = a1;
var env0_2;
if (a0.__isInteraction) {
value = environment.__proto__;
value = importDefault(359) /* metro dependency 359 */;
env0_2 = value.createInteractionHandle();
}
const _animation = this._animation;
if (this._animation) {
this._animation.stop();
}
this._animation = a0;
a0.start(this._value, _fun5169, _fun5170, _animation, this);
}
function value_5173(a0, a1) { // fn#5173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:4775, offset: 0x00cd6dbb, size: 95 bytes, params: 3, frame: 12
var value;
if (a0 === undefined) {
throw new global.Error('AnimatedValue: Attempting to set value to undefined');
}
this._value = a0;
if (a1) {
value = environment.__proto__;
flushValue(this);
}
this.__callListeners(this.__getValue());
}
function _fun5152(a0) { // fn#5152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:1730, offset: 0x00cd66fe, size: 30 bytes, params: 2, frame: 3
const binding = env0_0;
binding._value = a0 - binding._offset;
}
function _fun5159() { // fn#5159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:2870, offset: 0x00cd6984, size: 66 bytes, params: 1, frame: 14
const API = (importDefault(348) /* metro dependency 348 */).API;
return API.setAnimatedNodeValue(env0_1.__getNativeTag(), env0_0);
}
function _fun5163() { // fn#5163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:3437, offset: 0x00cd6ad1, size: 61 bytes, params: 1, frame: 12
const API = (importDefault(348) /* metro dependency 348 */).API;
const extractAnimatedNodeOffset = API.extractAnimatedNodeOffset;
const binding = env0_0;
return Reflect.apply(extractAnimatedNodeOffset, API, [binding.__getNativeTag()]);
}
function _fun5169(a0) { // fn#5169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:4388, offset: 0x00cd6cec, size: 28 bytes, params: 2, frame: 13
env0_1._updateValue(a0, true);
}
function _fun5170(a0) { // fn#5170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:388:4424, offset: 0x00cd6d08, size: 88 bytes, params: 2, frame: 12
var value2;
env0_1._animation = null;
if (env0_2 !== null) {
value2 = environment.__proto__.__proto__;
(importDefault(359) /* metro dependency 359 */).clearInteractionHandle(env0_2);
}
if (require) {
require(a0);
}
}