/* Metro module 13571; source: modules/quests/native/QuestDock/QuestDockUtils.tsx; dependencies: [27, 13572, 672, 4577, 2] */ function _fun103155(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:6, offset: 0x0225a722, size: 414 bytes, params: 8, frame: 22 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const PixelRatio = (require(27) /* metro dependency 27 */).PixelRatio; let value = require(13572) /* metro dependency 13572: QuestDockConstants */; const env0_2 = value.QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED; const env0_3 = value.QUEST_DOCK_COLLAPSED_MAX_WIDTH; const env0_4 = value.QUEST_DOCK_COLLAPSED_HEIGHT; const env0_5 = value.QUEST_DOCK_MODE_CHANGE_PHYSICS; const env0_6 = PixelRatio.get(); object = {code: 'function roundToNearestPixel_QuestDockUtilsTsx1(position){const{PIXEL_DENSITY}=this.__closure;return Math.round(position*PIXEL_DENSITY)/PIXEL_DENSITY;}'}; value = _fun103156(); object = {code: 'function getQuestDockExpandedHeightLimits_QuestDockUtilsTsx2(windowHeight,safeAreaTop,minContentHeight){const{QUEST_DOCK_COLLAPSED_HEIGHT}=this.__closure;return{minHeight:QUEST_DOCK_COLLAPSED_HEIGHT,maxHeight:Math.min(minContentHeight,windowHeight-safeAreaTop)};}'}; const value2 = _fun103158(); object = {code: 'function getQuestDockCollapsedWidth_QuestDockUtilsTsx3(windowWidth,safeAreaLeft,safeAreaRight){const{QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED,QUEST_DOCK_COLLAPSED_MAX_WIDTH}=this.__closure;safeAreaLeft=Math.max(safeAreaLeft,QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED);safeAreaRight=Math.max(safeAreaRight,QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED);return Math.min(windowWidth-safeAreaLeft-safeAreaRight,QUEST_DOCK_COLLAPSED_MAX_WIDTH);}'}; const value3 = _fun103160(); object = {code: 'function getQuestDockExpandedWidth_QuestDockUtilsTsx4(windowWidth,safeAreaLeft,safeAreaRight){const{QUEST_DOCK_COLLAPSED_MAX_WIDTH}=this.__closure;return Math.min(windowWidth-safeAreaLeft-safeAreaRight,QUEST_DOCK_COLLAPSED_MAX_WIDTH);}'}; const value4 = _fun103162(); object = {code: 'function getQuestDockClosedWidth_QuestDockUtilsTsx5(windowWidth,safeAreaLeft,safeAreaRight){const{QUEST_DOCK_COLLAPSED_MAX_WIDTH}=this.__closure;return Math.min(windowWidth-safeAreaLeft-safeAreaRight,QUEST_DOCK_COLLAPSED_MAX_WIDTH);}'}; const value5 = _fun103164(); const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis; const HOUR = Millis.HOUR; const env0_12 = 3 * HOUR; object = {code: 'function dimensionsLayoutTransition_QuestDockUtilsTsx6(values){const{withSpring,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{initialValues:{originX:values.currentOriginX,originY:values.currentOriginY,width:values.currentWidth,height:values.currentHeight},animations:{originX:withSpring(values.targetOriginX,QUEST_DOCK_MODE_CHANGE_PHYSICS),originY:withSpring(values.targetOriginY,QUEST_DOCK_MODE_CHANGE_PHYSICS),height:withSpring(values.targetHeight,QUEST_DOCK_MODE_CHANGE_PHYSICS),width:withSpring(values.targetWidth,QUEST_DOCK_MODE_CHANGE_PHYSICS)}};}'}; const value6 = _fun103166(); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUtils.tsx'); exports.roundToNearestPixel = value; exports.getQuestDockExpandedHeightLimits = value2; exports.getQuestDockCollapsedWidth = value3; exports.getQuestDockExpandedWidth = value4; exports.getQuestDockClosedWidth = value5; exports.isSoftDismissed = isSoftDismissed; exports.dimensionsLayoutTransition = value6; } function _fun103156() { // fn#103156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:452, offset: 0x0225a8c0, size: 57 bytes, params: 1, frame: 4 const closure = roundToNearestPixel; closure.__closure = {PIXEL_DENSITY: env0_6}; closure.__workletHash = 9602449563120; closure.__initData = env0_7; return closure; } function _fun103158() { // fn#103158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:961, offset: 0x0225a91f, size: 57 bytes, params: 1, frame: 4 const closure = function(a0, a1, a2) { var object = {}; object.minHeight = QUEST_DOCK_COLLAPSED_HEIGHT; var Math = global.Math; object.maxHeight = Math.min(a2, a0 - a1); return object; }; closure.__closure = {QUEST_DOCK_COLLAPSED_HEIGHT: QUEST_DOCK_COLLAPSED_HEIGHT}; closure.__workletHash = 880847803554; closure.__initData = env0_8; return closure; } function _fun103160() { // fn#103160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:1752, offset: 0x0225a98d, size: 66 bytes, params: 1, frame: 4 const closure = function(a0, a1, a2) { var Math = global.Math; var value2 = Math.max(a1, QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED); Math = global.Math; var value3 = Math.max(a2, QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED); Math = global.Math; return Math.min(a0 - value2 - value3, QUEST_DOCK_COLLAPSED_MAX_WIDTH); }; closure.__closure = {QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED, QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH}; closure.__workletHash = 1119343760780; closure.__initData = env0_9; return closure; } function _fun103162() { // fn#103162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:2367, offset: 0x0225aa22, size: 57 bytes, params: 1, frame: 4 const closure = function(a0, a1, a2) { var Math = global.Math; return Math.min(a0 - a1 - a2, QUEST_DOCK_COLLAPSED_MAX_WIDTH); }; closure.__closure = {QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH}; closure.__workletHash = 6480418564130; closure.__initData = env0_10; return closure; } function _fun103164() { // fn#103164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:2897, offset: 0x0225aa88, size: 57 bytes, params: 1, frame: 4 const closure = function(a0, a1, a2) { var Math = global.Math; return Math.min(a0 - a1 - a2, QUEST_DOCK_COLLAPSED_MAX_WIDTH); }; closure.__closure = {QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH}; closure.__workletHash = 14159592925974; closure.__initData = env0_11; return closure; } function _fun103166() { // fn#103166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:3773, offset: 0x0225aac1, size: 88 bytes, params: 1, frame: 14 const closure = dimensionsLayoutTransition; const object2 = {}; object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring; object2.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS; closure.__closure = object2; closure.__workletHash = 4497154070776; closure.__initData = env0_13; return closure; } function isSoftDismissed(a0) { // fn#103168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:4623, offset: 0x0225abe6, size: 46 bytes, params: 2, frame: 11 var r0; var Date; let value = a0 != null; if (value) { Date = global.Date; value = Date.now() - a0; value = value < env0_12; r0 = value; } else { r0 = value; } return r0; } function roundToNearestPixel(a0) { // fn#103157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:487, offset: 0x0225a8f9, size: 38 bytes, params: 2, frame: 12 const Math = global.Math; const round = Math.round; const binding = env1_6; return Reflect.apply(round, Math, [a0 * binding]) / binding; } function dimensionsLayoutTransition({currentOriginX, currentOriginY, currentWidth, currentHeight, targetOriginX, targetOriginY, targetHeight, targetWidth}) { // fn#103167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:3815, offset: 0x0225ab19, size: 205 bytes, params: 2, frame: 20 const object2 = {}; object2.initialValues = {originX: currentOriginX, originY: currentOriginY, width: currentWidth, height: currentHeight}; const object4 = {}; const value = environment.__proto__; object4.originX = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginX, QUEST_DOCK_MODE_CHANGE_PHYSICS); object4.originY = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginY, QUEST_DOCK_MODE_CHANGE_PHYSICS); object4.height = (require(4577) /* metro dependency 4577: spring */).withSpring(targetHeight, QUEST_DOCK_MODE_CHANGE_PHYSICS); object4.width = (require(4577) /* metro dependency 4577: spring */).withSpring(targetWidth, QUEST_DOCK_MODE_CHANGE_PHYSICS); object2.animations = object4; return object2; }