/* Metro module 3643; source: unknown; dependencies: [3235, 3239, 3429] */ import * as Module03235Module from './module-03235.js'; /* Metro dependency 3235 */ import * as Module03239Module from './module-03239.js'; /* Metro dependency 3239 */ import * as GetRoundingMethodModule from './module-03429-getRoundingMethod.js'; /* Metro dependency 3429 */ function _fun27833(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#27833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3770:6, offset: 0x00f62ca8, size: 126 bytes, params: 8, frame: 19 const env0_0 = require; const closure = function(a0) { var value = a0; return value && value.__esModule ? value : {default: value}; }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); exports.default = roundToNearestMinutes; const env0_2 = closure(Module03235Module); const env0_3 = closure(Module03239Module); module.exports = exports.default; function roundToNearestMinutes(a0, a1) { // fn#27835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3770:102, offset: 0x00f62d26, size: 371 bytes, params: 3, frame: 21 let value = undefined; const value2 = 1; if (arguments.length < value2) { throw new global.TypeError('1 argument required, but only none provided present'); } const property = env0_3.default; const nearestTo = a1 == null ? value : a1.nearestTo; const value4 = property(nearestTo === null || value === nearestTo ? value2 : nearestTo); if (value4 < value2) { throw new global.RangeError('`options.nearestTo` must be between 1 and 30'); } if (value4 > 30) { throw new global.RangeError('`options.nearestTo` must be between 1 and 30'); } const value5 = (0, env0_2.default)(a0); const value8 = value5.getMinutes() + value5.getSeconds() / 60; const getRoundingMethod = (GetRoundingMethodModule).getRoundingMethod; value = getRoundingMethod(a1 == null ? value : a1.roundingMethod)(value8 / value4) * value4; const value10 = value8 % value4; const Math = global.Math; const value11 = Math.round(value10 / value4) * value4; const Date = global.Date; const fullYear = value5.getFullYear(); const month = value5.getMonth(); const date2 = value5.getDate(); const hours = value5.getHours(); value += value11; const value16 = Object.create(Date.prototype, {constructor: {value: Date}}); const date = new Date(fullYear, month, date2, hours, value); return date instanceof Object ? date : value16; } } global.__d(_fun27833, 3643, [3235, 3239, 3429]) /* metro module 3643, dependencies: [3235, 3239, 3429] */;