205 lines
8.4 KiB
TypeScript
205 lines
8.4 KiB
TypeScript
/* Metro module 15269; source: lib/ModalRegistry.tsx; dependencies: [6, 7, 2] */
|
|
import ClassCallCheck from '../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
|
|
function _fun116753(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:6, offset: 0x02495c4e, size: 148 bytes, params: 8, frame: 18
|
|
const _arrayLikeToArray_116756 = function(a0, a1) {
|
|
var r0;
|
|
var r1;
|
|
var r2;
|
|
var value3;
|
|
var length;
|
|
var value5;
|
|
var value = undefined;
|
|
var value2 = value == null;
|
|
reducibleJoin2: while (true) {
|
|
if (value2) {
|
|
r0 = value2;
|
|
break reducibleJoin2;
|
|
}
|
|
value3 = value > a0.length;
|
|
r0 = value3;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (r0) {
|
|
length = a0.length;
|
|
r1 = length;
|
|
break reducibleJoin4;
|
|
}
|
|
r1 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
value = (0, global.Array)(r1);
|
|
var value4 = 0;
|
|
if (value4 < r1) {
|
|
r2 = value4;
|
|
reducibleLoop5: while (true) {
|
|
value[r2] = a0[r2];
|
|
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value5 < r1) {
|
|
r2 = value5;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleLoop5;
|
|
}
|
|
}
|
|
return value;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = _fun116757();
|
|
(FileImportTrackerModule).fileFinishedImporting('lib/ModalRegistry.tsx');
|
|
exports.default = value;
|
|
function _createForOfIteratorHelperLoose_116754(a0, a1) { // fn#116754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:120, offset: 0x02495ce2, size: 372 bytes, params: 3, frame: 20
|
|
var r6;
|
|
var r9;
|
|
var r5;
|
|
var value3;
|
|
var regexp;
|
|
const env0_0 = a0;
|
|
const Symbol = global.Symbol;
|
|
let value = typeof Symbol !== 'undefined';
|
|
let r1 = value && a0[global.Symbol.iterator];
|
|
r1 = !r1 ? a0['@@iterator'] : r1;
|
|
if (r1) {
|
|
value = r1.call(a0);
|
|
return value.next.bind(value);
|
|
}
|
|
const Array = global.Array;
|
|
if (Array.isArray(a0)) {
|
|
if (r1) {
|
|
}
|
|
return _fun116755;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_116756(a0, value);
|
|
r5 = value;
|
|
} else {
|
|
value3 = ({}).toString.call(a0).slice(8, -1);
|
|
r6 = value3 === 'Object' && a0.constructor;
|
|
r9 = r6 ? a0.constructor.name : value3;
|
|
if (r9 === 'Map') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Set') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Arguments') {
|
|
value = _arrayLikeToArray_116756(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_116756(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun116755;
|
|
}
|
|
const TypeError = global.TypeError;
|
|
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
|
function _fun116755() { // fn#116755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:691, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
|
|
return CreateClass >= env0_0.length ? {done: true} : {done: false,
|
|
value: env0_0[typeof CreateClass === 'bigint' ? CreateClass : +CreateClass]};
|
|
}
|
|
|
|
}
|
|
|
|
function _fun116757() { // fn#116757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:1036, offset: 0x02495e56, size: 88 bytes, params: 1, frame: 15
|
|
return CreateClass(ModalRegistry, [{key: 'getStores', value: function() {
|
|
return this.stores;
|
|
}}, {key: 'getOpenModal', value: value_116760}]);
|
|
function ModalRegistry(a0) { // fn#116758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:1057, offset: 0x02495eae, size: 184 bytes, params: 2, frame: 20
|
|
var r5;
|
|
var r8;
|
|
var value7;
|
|
var stores;
|
|
var value8;
|
|
var value9;
|
|
var value10;
|
|
var add;
|
|
var value11;
|
|
var value12;
|
|
env1_0(this, ModalRegistry);
|
|
this.modals = a0;
|
|
const Set = global.Set;
|
|
const set = new Set();
|
|
const value5 = _createForOfIteratorHelperLoose_116754(a0);
|
|
const value6 = value5();
|
|
let done = value6.done;
|
|
if (!done) {
|
|
r5 = value6;
|
|
reducibleLoop1: while (true) {
|
|
_createForOfIteratorHelperLoose_116754Binding = _createForOfIteratorHelperLoose_116754;
|
|
value7 = r5.value;
|
|
stores = value7.stores;
|
|
value8 = _createForOfIteratorHelperLoose_116754Binding(stores);
|
|
value9 = value8();
|
|
done = value9.done;
|
|
if (!done) {
|
|
r8 = value9;
|
|
reducibleLoop2: while (true) {
|
|
value10 = r8.value;
|
|
add = set.add;
|
|
Reflect.apply(add, set, [value10]);
|
|
value11 = value8();
|
|
done = value11.done;
|
|
if (done) {
|
|
break reducibleLoop2;
|
|
}
|
|
r8 = value11;
|
|
continue reducibleLoop2;
|
|
}
|
|
}
|
|
value12 = value5();
|
|
done = value12.done;
|
|
if (done) {
|
|
break reducibleLoop1;
|
|
}
|
|
r5 = value12;
|
|
continue reducibleLoop1;
|
|
}
|
|
}
|
|
const Array = global.Array;
|
|
this.stores = Array.from(set);
|
|
}
|
|
|
|
function value_116760() { // fn#116760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:1439, offset: 0x02495f71, size: 199 bytes, params: 1, frame: 13
|
|
const index = this.modals.findIndex(function(a0) {
|
|
return a0.isOpen();
|
|
});
|
|
if (index === -1) {
|
|
return null;
|
|
}
|
|
const property = this.modals[index];
|
|
const getProps = property.getProps;
|
|
let r1 = getProps == null ? undefined : property.getProps();
|
|
r1 = r1 ?? ({});
|
|
const object = {key: index};
|
|
object.component = property.getComponent();
|
|
object.props = r1;
|
|
object.closable = property.closable == null || property.closable;
|
|
object.backdropInstant = property.backdropInstant != null && property.backdropInstant;
|
|
object.backdropStyle = property.backdropStyle;
|
|
object.disableAnimation = property.disableAnimation != null && property.disableAnimation;
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun116753, 15269, [6, 7, 2]) /* metro module 15269, dependencies: [6, 7, 2] */;
|