/* Metro module 13540; source: modules/quests/native/BountiesModal/BountiesModalTimer.tsx; dependencies: [31, 27, 33, 4582, 4017, 7744, 4501, 697, 477, 4504, 4573, 8707, 2] */ import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ import Module07744 from '../../../../by-id/module-07744.js'; /* Metro dependency 7744 */ 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 ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */ import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */ import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */ import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */ import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */ import * as ButtonConstantsNativeModule from '../../../../design/components/Button/native/ButtonConstants.native.tsx'; /* Metro dependency 4582 */ import * as Module07744Module from '../../../../by-id/module-07744.js'; /* Metro dependency 7744 */ import * as CheckmarkSmallBoldIconModule from '../../../../design/components/Icon/native/redesign/generated/CheckmarkSmallBoldIcon.tsx'; /* Metro dependency 8707 */ function _fun102897(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:6, offset: 0x0224d951, size: 817 bytes, params: 8, frame: 26 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const value = undefined; const SMALL_BUTTON_HEIGHT = (ButtonConstantsNativeModule).SMALL_BUTTON_HEIGHT; const value3 = (SMALL_BUTTON_HEIGHT - 4) / 2; const Math = global.Math; const PI = Math.PI; const env0_8 = 2 * PI * value3; const Easing = (ReanimatedRexportModule).Easing; const env0_9 = Easing.bezier(0.15, 0.21, 0.58, 1); const env0_10 = Easing.bezier(0.61, 0, 0.58, 1); const env0_11 = Easing.bezier(0.42, 0, 0.58, 1); const createAnimatedComponent = ReanimatedRexport.createAnimatedComponent; const Circle = (Module07744Module).Circle; const env0_12 = Reflect.apply(createAnimatedComponent, ReanimatedRexport, [Circle]); const createStyles = CreateStylesModule.createStyles; object = {}; const object2 = {'alignItems': 'center', 'justifyContent': 'center'}; const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT; object2.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT; object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round; object2.width = SMALL_BUTTON_HEIGHT; object2.height = SMALL_BUTTON_HEIGHT; object.progress = object2; object.ring = {position: 'absolute', transform: [{rotate: '-90deg'}]}; const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST; object.trackPath = {color: BACKGROUND_SURFACE_HIGHEST}; const object6 = {}; const CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT; object6.color = CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT; object6.lineHeight = PlatformUtilsModule.isAndroid() ? 14 : value; object.countdownText = object6; object.checkmarkLayer = {'position': 'absolute', 'inset': 6, 'alignItems': 'center', 'justifyContent': 'center'}; const object7 = {'width': 20, 'height': 20, 'backgroundColor': '#2ECC71'}; object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round; object.checkmarkBackground = object7; object.checkmarkIcon = {'width': 20, 'height': 20}; const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [object]); object = {code: 'function BountiesModalTimerTsx1(){const{PROGRESS_CIRCUMFERENCE,animatedProgress}=this.__closure;return{strokeDashoffset:PROGRESS_CIRCUMFERENCE-PROGRESS_CIRCUMFERENCE*animatedProgress.get()};}'}; object = {code: 'function BountiesModalTimerTsx2(){const{checkmarkBackgroundScale}=this.__closure;return{transform:[{scale:checkmarkBackgroundScale.get()}]};}'}; object = {code: 'function BountiesModalTimerTsx3(){const{checkmarkScale}=this.__closure;return{transform:[{scale:checkmarkScale.get()}]};}'}; (FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalTimer.tsx'); exports.default = BountiesModalTimer; return value; function BountiesModalTimer({isCompleted, totalSeconds, remainingSeconds}) { // fn#102898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:1577, offset: 0x0224dc82, size: 1169 bytes, params: 2, frame: 34 const styles = useStyles(); let r6 = isCompleted || remainingSeconds <= 0; const Math = global.Math; const max = Math.max; const Math2 = global.Math; const value5 = Reflect.apply(max, Math, [1, Math2.ceil(remainingSeconds)]); const r1 = isCompleted ? 1 : totalSeconds > 0 ? 1 - remainingSeconds / totalSeconds : 0; const value8 = (ReanimatedRexportModule).useSharedValue(r1); const value9 = (ReanimatedRexportModule).useSharedValue(0); const env0_3 = value9; const value10 = (ReanimatedRexportModule).useSharedValue(0); let binding = env0_3; binding.useEffect(_fun102899, [value8, r1]); const env0_5 = binding.useRef(false); binding.useEffect(_fun102900, [r6, value9, value10]); const useAnimatedProps = ReanimatedRexportModule.useAnimatedProps; let closure = BountiesModalTimerU; binding = env0_8; closure.__closure = {PROGRESS_CIRCUMFERENCE: binding, animatedProgress: value8}; closure.__workletHash = 12964700773124; closure.__initData = env0_14; const value11 = Reflect.apply(useAnimatedProps, ReanimatedRexportModule, [closure]); let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle; closure = BountiesModalTimerX; closure.__closure = {checkmarkBackgroundScale: value9}; closure.__workletHash = 10834015407160; closure.__initData = env0_15; const value12 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]); useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle; closure = BountiesModalTimerG; closure.__closure = {checkmarkScale: value10}; closure.__workletHash = 7510845920441; closure.__initData = env0_16; const value13 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]); const defaultImport = Module07744; const object2 = {}; const SMALL_BUTTON_HEIGHT = (ButtonConstantsNativeModule).SMALL_BUTTON_HEIGHT; object2.height = SMALL_BUTTON_HEIGHT; object2.width = SMALL_BUTTON_HEIGHT; object2.style = styles.ring; const Circle = (Module07744Module).Circle; const binding2 = env0_7; const items2 = [ ((Component) => {((Component) => )(env0_12)})(defaultImport), ]; r6 = !r6 && ((Text) => {value5})((require(4573) /* metro dependency 4573: Text */).Text); items2[1] = r6; const View2 = (ReanimatedRexport).View; items2[2] = ( ); const View3 = (ReanimatedRexport).View; const items4 = [styles.checkmarkLayer, value13]; const CheckmarkSmallBoldIcon = (CheckmarkSmallBoldIconModule).CheckmarkSmallBoldIcon; const CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (Native).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT; items2[3] = ( ); return ( {items2} ); function _fun102899() { // fn#102899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:1829, offset: 0x0224e113, size: 78 bytes, params: 1, frame: 18 const binding = env0_2; const set = binding.set; Reflect.apply(set, binding, [TimingModule.withTiming(env0_1, {duration: 500}, 'animate-always')]); } function _fun102900() { // fn#102900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:1936, offset: 0x0224e161, size: 388 bytes, params: 1, frame: 30 var r1; var r0; var value2; var value3; var moduleValue; var withSequence; var withTiming; var value4; var moduleValue3; var withDelay; var moduleValue4; var moduleValue5; var binding3; var value5; var moduleValue6; var value; const current = env0_5.current; env0_5.current = true; let binding = env0_0; const binding2 = env0_3; let set = binding2.set; if (binding) { if (current) { value2 = environment.__proto__; value3 = undefined; moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */; withSequence = moduleValue.withSequence; value4 = (require(4504) /* metro dependency 4504: timing */).withTiming(1.65, {duration: 267, easing: env1_9}); moduleValue3 = require(4504) /* metro dependency 4504: timing */; withTiming = moduleValue3.withTiming; Reflect.apply(set, binding2, [Reflect.apply(withSequence, moduleValue, [value4, Reflect.apply(withTiming, moduleValue3, [1, {duration: 233, easing: env1_10}])])]); binding = ReactNativeModule.View; set = binding.set; value = require(4017) /* metro dependency 4017: ReanimatedRexport */; withDelay = value.withDelay; moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */; withSequence = moduleValue4.withSequence; moduleValue5 = require(4504) /* metro dependency 4504: timing */; withTiming = moduleValue5.withTiming; binding3 = env1_11; value5 = Reflect.apply(withTiming, moduleValue5, [1.25, {duration: 167, easing: binding3}]); moduleValue6 = require(4504) /* metro dependency 4504: timing */; withTiming = moduleValue6.withTiming; Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [167, Reflect.apply(withSequence, moduleValue4, [value5, Reflect.apply(withTiming, moduleValue6, [1, {duration: 333, easing: binding3}])])])]); r1 = value3; } else { Reflect.apply(set, binding2, [1]); ReactNativeModule.View.set(1); r1 = undefined; } r0 = r1; } else { Reflect.apply(set, binding2, [0]); ReactNativeModule.View.set(0); r0 = undefined; } return r0; } function BountiesModalTimerU() { // fn#102901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:2362, owner: BountiesModalTimer.U, offset: 0x0224e2e5, size: 40 bytes, params: 1, frame: 11 const binding = env1_8; const binding2 = env0_2; const get = binding2.get; return {strokeDashoffset: binding - binding * Reflect.apply(get, binding2, [])}; } function BountiesModalTimerX() { // fn#102902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:2536, owner: BountiesModalTimer.x, offset: 0x0224e30d, size: 39 bytes, params: 1, frame: 11 const object2 = {}; object2.scale = env0_3.get(); return {transform: [object2]}; } function BountiesModalTimerG() { // fn#102903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:2692, owner: BountiesModalTimer.G, offset: 0x0224e334, size: 39 bytes, params: 1, frame: 11 const object2 = {}; object2.scale = ReactNativeModule.View.get(); return {transform: [object2]}; } } } global.__d(_fun102897, 13540, [31, 27, 33, 4582, 4017, 7744, 4501, 697, 477, 4504, 4573, 8707, 2]) /* metro module 13540, dependencies: [31, 27, 33, 4582, 4017, 7744, 4501, 697, 477, 4504, 4573, 8707, 2] */;