/* Metro module 1612; source: unknown; dependencies: [57, 1613, 1614, 1617, 1621, 1625] */ function _fun17682(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#17682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:6, offset: 0x00e73f89, size: 580 bytes, params: 8, frame: 23 var executeOnUIRuntimeSync; const env0_1 = require; let Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(57) /* metro dependency 57 */; const env0_4 = (require(1613) /* metro dependency 1613 */).isJest(); value = require(1613) /* metro dependency 1613 */; value = value.shouldBeUseWeb(); const env0_6 = (require(1613) /* metro dependency 1613 */).isChromeDebugger(); object = {code: "function overrideLogFunctionImplementation_Pnpm_initializersTs1(){const{replaceLoggerImplementation,runOnJS,logToLogBoxAndConsole}=this.__closure;replaceLoggerImplementation(function(data){'worklet';runOnJS(logToLogBoxAndConsole)(data);});}"}; object = {code: 'function pnpm_initializersTs2(data){const{runOnJS,logToLogBoxAndConsole}=this.__closure;runOnJS(logToLogBoxAndConsole)(data);}'}; const value3 = _fun17683(); const value4 = require(1614) /* metro dependency 1614 */; const registerLoggerConfig = value4.registerLoggerConfig; const DEFAULT_LOGGER_CONFIG = value4.DEFAULT_LOGGER_CONFIG; Reflect.apply(registerLoggerConfig, value4, [DEFAULT_LOGGER_CONFIG]); value3(); if (value) { global._WORKLET = false; global._log = global.console.log; global._getAnimationTimestamp = function() { return global.performance.now(); }; } else { value = require(1617) /* metro dependency 1617 */; executeOnUIRuntimeSync = value.executeOnUIRuntimeSync; Reflect.apply(executeOnUIRuntimeSync, value, [(require(1621) /* metro dependency 1621 */).registerReanimatedError])(); value = require(1617) /* metro dependency 1617 */; value = value.executeOnUIRuntimeSync(value4.registerLoggerConfig); value(DEFAULT_LOGGER_CONFIG); value = require(1617) /* metro dependency 1617 */; executeOnUIRuntimeSync = value.executeOnUIRuntimeSync; Reflect.apply(executeOnUIRuntimeSync, value, [value3])(); } object = {code: 'function callGuardDEV_Pnpm_initializersTs3(fn,...args){try{return fn(...args);}catch(e){if(global.__ErrorUtils){global.__ErrorUtils.reportFatalError(e);}else{throw e;}}}'}; value = _fun17687(); object = {code: 'function setupCallGuard_Pnpm_initializersTs4(){const{callGuardDEV,runOnJS,reportFatalErrorOnJS}=this.__closure;global.__callGuardDEV=callGuardDEV;global.__ErrorUtils={reportFatalError:function(error){runOnJS(reportFatalErrorOnJS)({message:error.message,stack:error.stack});}};}'}; const value5 = _fun17689(); const env0_13 = (() => { var Object = global.Object; var Object2 = global.Object; return Object.fromEntries(Object2.entries(global.console).map(_fun17693)); })(); object = {code: 'function setupConsole_Pnpm_initializersTs5(){const{IS_CHROME_DEBUGGER,runOnJS,capturableConsole}=this.__closure;if(!IS_CHROME_DEBUGGER){global.console={assert:runOnJS(capturableConsole.assert),debug:runOnJS(capturableConsole.debug),log:runOnJS(capturableConsole.log),warn:runOnJS(capturableConsole.warn),error:runOnJS(capturableConsole.error),info:runOnJS(capturableConsole.info)};}}'}; const value6 = _fun17695(); object = {code: 'function setupRequestAnimationFrame_Pnpm_initializersTs6(){const{callMicrotasks}=this.__closure;const nativeRequestAnimationFrame=global.requestAnimationFrame;let animationFrameCallbacks=[];let flushRequested=false;global.__flushAnimationFrame=function(frameTimestamp){const currentCallbacks=animationFrameCallbacks;animationFrameCallbacks=[];currentCallbacks.forEach(function(f){return f(frameTimestamp);});callMicrotasks();};global.requestAnimationFrame=function(callback){animationFrameCallbacks.push(callback);if(!flushRequested){flushRequested=true;nativeRequestAnimationFrame(function(timestamp){flushRequested=false;global.__frameTimestamp=timestamp;global.__flushAnimationFrame(timestamp);global.__frameTimestamp=undefined;});}return-1;};}'}; const env0_17 = _fun17697(); object = {code: 'function pnpm_initializersTs7(){const{setupCallGuard,setupConsole,SHOULD_BE_USE_WEB,setupMicrotasks,setupRequestAnimationFrame}=this.__closure;setupCallGuard();setupConsole();if(!SHOULD_BE_USE_WEB){setupMicrotasks();setupRequestAnimationFrame();}global.lastUpdateFrameTimeByTag={};global.lastUpdateByTag={};}'}; exports.callGuardDEV = value; exports.setupCallGuard = value5; exports.setupConsole = value6; exports.initializeUIRuntime = initializeUIRuntime; } function _fun17683() { // fn#17683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:575, offset: 0x00e741cd, size: 120 bytes, params: 1, frame: 16 const closure = overrideLogFunctionImplementation; const object2 = {}; object2.replaceLoggerImplementation = (require(1614) /* metro dependency 1614 */).replaceLoggerImplementation; object2.runOnJS = (require(1617) /* metro dependency 1617 */).runOnJS; object2.logToLogBoxAndConsole = (require(1614) /* metro dependency 1614 */).logToLogBoxAndConsole; closure.__closure = object2; closure.__workletHash = 17079079828449; closure.__initData = env0_7; return closure; } function _fun17687() { // fn#17687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:1663, offset: 0x00e742fc, size: 46 bytes, params: 1, frame: 2 const closure = callGuardDEV; closure.__closure = {}; closure.__workletHash = 4198243943606; closure.__initData = env0_9; return closure; } function _fun17689() { // fn#17689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:2252, offset: 0x00e743c3, size: 109 bytes, params: 1, frame: 15 const closure = setupCallGuard; const object2 = {}; object2.callGuardDEV = env0_10; object2.runOnJS = (require(1617) /* metro dependency 1617 */).runOnJS; object2.reportFatalErrorOnJS = (require(1621) /* metro dependency 1621 */).reportFatalErrorOnJS; closure.__closure = object2; closure.__workletHash = 14948004486848; closure.__initData = env0_11; return closure; } function createMemorySafeCapturableConsole() { // fn#17692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:2626, offset: 0x00e744b0, size: 61 bytes, params: 1, frame: 13 const Object = global.Object; const fromEntries = Object.fromEntries; const Object2 = global.Object; const value = Object2.entries(global.console); return Reflect.apply(fromEntries, Object, [value.map(_fun17693)]); } function _fun17695() { // fn#17695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:3318, offset: 0x00e7455a, size: 99 bytes, params: 1, frame: 14 const closure = setupConsole; const object2 = {}; object2.IS_CHROME_DEBUGGER = env0_6; object2.runOnJS = (require(1617) /* metro dependency 1617 */).runOnJS; object2.capturableConsole = env0_13; closure.__closure = object2; closure.__workletHash = 1380126086828; closure.__initData = env0_14; return closure; } function _fun17697() { // fn#17697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:4454, offset: 0x00e746af, size: 79 bytes, params: 1, frame: 14 const closure = setupRequestAnimationFrame; const object2 = {}; object2.callMicrotasks = (require(1617) /* metro dependency 1617 */).callMicrotasks; closure.__closure = object2; closure.__workletHash = 14722266205784; closure.__initData = env0_16; return closure; } function initializeUIRuntime(a0) { // fn#17703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:5335, offset: 0x00e747ee, size: 266 bytes, params: 2, frame: 18 var moduleValue2; var runOnUIImmediately; var closure; var object2; const moduleValue = require(1613) /* metro dependency 1613 */; if (moduleValue.isWeb()) { return undefined; } if (a0) { if (env0_4) { global.globalThis.requestAnimationFrame = (require(1625) /* metro dependency 1625 */).mockedRequestAnimationFrame; } moduleValue2 = require(1617) /* metro dependency 1617 */; runOnUIImmediately = moduleValue2.runOnUIImmediately; closure = pnpm_initializersTs7; object2 = {setupCallGuard: env0_12, setupConsole: env0_15, SHOULD_BE_USE_WEB: env0_5}; object2.setupMicrotasks = (require(1617) /* metro dependency 1617 */).setupMicrotasks; object2.setupRequestAnimationFrame = env0_17; closure.__closure = object2; closure.__workletHash = 2162023783290; closure.__initData = env0_18; Reflect.apply(runOnUIImmediately, moduleValue2, [closure])(); return undefined; } const Error = global.Error; throw new Error('[Reanimated] Reanimated is trying to initialize the UI runtime without a valid ReanimatedModule'); } function overrideLogFunctionImplementation() { // fn#17684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:592, offset: 0x00e74245, size: 120 bytes, params: 1, frame: 18 const moduleValue = require(1614) /* metro dependency 1614 */; const replaceLoggerImplementation = moduleValue.replaceLoggerImplementation; const closure = pnpm_initializersTs2; const object2 = {}; object2.runOnJS = (require(1617) /* metro dependency 1617 */).runOnJS; object2.logToLogBoxAndConsole = moduleValue.logToLogBoxAndConsole; closure.__closure = object2; closure.__workletHash = 10834450741065; closure.__initData = env1_8; Reflect.apply(replaceLoggerImplementation, moduleValue, [closure]); } function callGuardDEV(a0) { // fn#17688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:1680, offset: 0x00e7432a, size: 153 bytes, params: 2, frame: 20 var r4; var value; var Array; var value2; var value3; var value4; var prototype; var value5; var array; var value6; var value7; var value8; var apply; var error; var __ErrorUtils; exceptionSkip8: while (true) { exceptionLanding8: while (true) { value = arguments.length; Array = global.Array; value2 = 1; value3 = 0; reducibleJoin2: while (true) { if (value > value2) { value4 = value - value2; r4 = value4; break reducibleJoin2; } r4 = value3; break reducibleJoin2; } prototype = Array.prototype; value5 = Object.create(prototype, {constructor: {value: Array}}); array = new Array(); value6 = array instanceof Object ? array : value5; if (value2 < value) { r4 = value2; reducibleLoop3: while (true) { value7 = r4 - value2; value6[value7] = arguments[r4]; value8 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1; if (value8 < value) { r4 = value8; continue reducibleLoop3; } break reducibleLoop3; } } try { apply = a0.apply; } catch (error) { break exceptionLanding8; } try { value = Reflect.apply(apply, a0, [undefined, value6]); } catch (error) { break exceptionLanding8; } return value; break exceptionSkip8; } value = environment.__proto__; __ErrorUtils = env1_0.__ErrorUtils; if (__ErrorUtils) { __ErrorUtils = env1_0.__ErrorUtils; __ErrorUtils.reportFatalError(error); return undefined; } throw error; break exceptionSkip8; } } function setupCallGuard() { // fn#17690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:2269, offset: 0x00e74430, size: 43 bytes, params: 1, frame: 3 const binding = env1_0; binding.__callGuardDEV = env1_10; binding.__ErrorUtils = {reportFatalError: reportFatalError_17691}; } function _fun17693(a0) { // fn#17693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:2725, offset: 0x00e744ed, size: 109 bytes, params: 2, frame: 16 var environment; let value = environment.__proto__; value = env1_3(a0, 2); const property = value[0]; const property2 = value[1]; const closure = methodWrapper; if (property2.name) { global.Object.defineProperty(closure, 'name', {value: property2.name, writable: false}); } return [property, closure]; } function setupConsole() { // fn#17696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:3335, offset: 0x00e745bd, size: 242 bytes, params: 1, frame: 18 var binding; var object2; if (!env1_6) { binding = env1_0; object2 = {}; object2.assert = (require(1617) /* metro dependency 1617 */).runOnJS(env1_13.assert); object2.debug = (require(1617) /* metro dependency 1617 */).runOnJS(env1_13.debug); object2.log = (require(1617) /* metro dependency 1617 */).runOnJS(env1_13.log); object2.warn = (require(1617) /* metro dependency 1617 */).runOnJS(env1_13.warn); object2.error = (require(1617) /* metro dependency 1617 */).runOnJS(env1_13.error); object2.info = (require(1617) /* metro dependency 1617 */).runOnJS(env1_13.info); binding.console = object2; } } function setupRequestAnimationFrame() { // fn#17698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:4471, offset: 0x00e746fe, size: 59 bytes, params: 1, frame: 3 const binding = env1_0; const env0_0 = binding.requestAnimationFrame; const env0_1 = []; binding.__flushAnimationFrame = __flushAnimationFrame; binding.requestAnimationFrame = requestAnimationFrame_17701; } function pnpm_initializersTs7() { // fn#17704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:5620, owner: initializeUIRuntime.pnpm_initializersTs7, offset: 0x00e748f8, size: 88 bytes, params: 1, frame: 13 env1_12(); env1_15(); if (!env1_5) { (require(1617) /* metro dependency 1617 */).setupMicrotasks(); env1_17(); } const binding = env1_0; binding.lastUpdateFrameTimeByTag = {}; binding.lastUpdateByTag = {}; } function pnpm_initializersTs2(a0) { // fn#17685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:683, owner: overrideLogFunctionImplementation.pnpm_initializersTs2, offset: 0x00e742bd, size: 63 bytes, params: 2, frame: 14 let value = environment.__proto__.__proto__; value = Reflect.apply((require(1617) /* metro dependency 1617 */).runOnJS, value, [(require(1614) /* metro dependency 1614 */).logToLogBoxAndConsole]); value(a0); } function setupCallGuardReportFatalError({message, stack}) { // fn#17691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:2347, owner: setupCallGuard.reportFatalError, offset: 0x00e7445b, size: 85 bytes, params: 2, frame: 15 let value = environment.__proto__.__proto__; value = Reflect.apply((require(1617) /* metro dependency 1617 */).runOnJS, value, [(require(1621) /* metro dependency 1621 */).reportFatalErrorOnJS]); value({message: message, stack: stack}); } function __flushAnimationFrame(a0) { // fn#17699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:4573, owner: setupRequestAnimationFrame.__flushAnimationFrame, offset: 0x00e74739, size: 76 bytes, params: 2, frame: 12 var environment; const env0_0 = a0; const binding = env0_1; env0_1 = []; binding.forEach(_fun17700); const value = environment.__proto__.__proto__; (require(1617) /* metro dependency 1617 */).callMicrotasks(); } function setupRequestAnimationFrameRequestAnimationFrame(a0) { // fn#17701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:4686, owner: setupRequestAnimationFrame.requestAnimationFrame, offset: 0x00e74785, size: 59 bytes, params: 2, frame: 12 env0_1.push(a0); if (!env0_2) { requestAnimationFrame(_fun17702); } return -1; } function _fun17702(a0) { // fn#17702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1739:4727, offset: 0x00e747c0, size: 46 bytes, params: 2, frame: 11 const binding = env3_0; binding.__frameTimestamp = a0; binding.__flushAnimationFrame(a0); binding.__frameTimestamp = undefined; }