/* Metro module 11105; source: modules/device/native/getDeviceMediaPhotos.tsx; dependencies: [27, 3, 1216, 477, 11106, 2] */ import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */ import SentryUtilsNative from '../../../utils/SentryUtils.native.tsx'; /* Metro dependency 1216 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */ import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */ function _fun85071(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11291:6, offset: 0x01f62885, size: 166 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = Logger; value = new value('DeviceMedia.tsx'); (FileImportTrackerModule).fileFinishedImporting('modules/device/native/getDeviceMediaPhotos.tsx'); exports.default = getDeviceMediaPhotos; function getDeviceMediaPhotos({batchSize, endCursor, lastAssetIndex, lastNodeImageUri, extensions, onFetched, onError = getDeviceMediaPhotosU}) { // fn#85072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11291:247, offset: 0x01f6292b, size: 280 bytes, params: 2, frame: 21 var CameraRollUtils; var value; if (PlatformUtilsModule.isIOS()) { if ((importDefault(11106) /* metro dependency 11106: DCDPhotos */) != null) { value = importDefault(11106) /* metro dependency 11106: DCDPhotos */; value = value.getPhotos({'first': null, 'groupTypes': 'Recents', 'assetType': 'All', first: batchSize, after: endCursor, extensions: extensions}); value = value.then(onFetched); value.catch(onError); } } else { CameraRollUtils = NativeModules.CameraRollUtils; value = CameraRollUtils.getPhotos({first: batchSize, assetType: 'All', after: lastNodeImageUri, offset: lastAssetIndex, extensions: extensions}); value = value.then(onFetched); value.catch(onError); } function getDeviceMediaPhotosU(a0) { // fn#85073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11291:373, owner: getDeviceMediaPhotos.u, offset: 0x01f62a43, size: 100 bytes, params: 2, frame: 16 const value = environment.__proto__; env1_4.log('CameraRollUtils -- Failed to get photos with error ' + a0); (SentryUtilsNative).captureException(a0, {tags: {source: 'DEVICE_MEDIA'}}); } } } global.__d(_fun85071, 11105, [27, 3, 1216, 477, 11106, 2]) /* metro module 11105, dependencies: [27, 3, 1216, 477, 11106, 2] */;