/* Metro module 11850; source: modules/dice_roll/native/DiceRollBar.tsx; dependencies: [31, 27, 4502, 11526, 33, 4501, 697, 566, 4017, 4504, 1305, 11851, 11852, 4573, 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 AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */ 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 NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */ import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */ import * as DiceRollStoreModule from '../DiceRollStore.tsx'; /* Metro dependency 11526 */ import * as DiceRollUtilsModule from '../DiceRollUtils.tsx'; /* Metro dependency 11851 */ import * as DiceIconModule from '../../../design/components/Icon/native/redesign/generated/DiceIcon.tsx'; /* Metro dependency 11852 */ function _fun90811(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12036:6, offset: 0x02047513, size: 356 bytes, params: 8, frame: 22 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = JsxRuntimeModule; const env0_7 = value.jsx; const env0_8 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; const object3 = {'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 16, 'paddingVertical': 8, 'gap': 12, 'borderTopWidth': 1}; const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE; object3.borderColor = BORDER_SUBTLE; const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH; object3.backgroundColor = BACKGROUND_SURFACE_HIGH; const env0_9 = Reflect.apply(createStyles, value, [{animatedContainer: {overflow: 'hidden'}, container: object3}]); object = {code: 'function DiceRollBarTsx1(){const{useReducedMotion,height,opacity,withTiming,ANIMATION_DURATION_MS,DECELERATED_EASING}=this.__closure;if(useReducedMotion){return{height:height.get(),opacity:opacity.get()};}return{height:withTiming(height.get(),{duration:ANIMATION_DURATION_MS,easing:DECELERATED_EASING}),opacity:withTiming(opacity.get(),{duration:ANIMATION_DURATION_MS,easing:DECELERATED_EASING})};}'}; object = {code: 'function DiceRollBarTsx2(){const{rotation}=this.__closure;return{transform:[{rotate:rotation.get()+"deg"}]};}'}; (FileImportTrackerModule).fileFinishedImporting('modules/dice_roll/native/DiceRollBar.tsx'); exports.default = DiceRollBar; function DiceRollBar({channelId}) { // fn#90812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12036:1076, offset: 0x02047677, size: 750 bytes, params: 2, frame: 27 const styles = useStyles(); const value3 = useDiceRollState(channelId); const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() { return AccessibilityStore.useReducedMotion; }); const value4 = (ReanimatedRexportModule).useSharedValue(0); const value5 = (ReanimatedRexportModule).useSharedValue(0); const value6 = (ReanimatedRexportModule).useSharedValue(0); const env0_3 = value6; const r3 = value3 != null && !value3.dismissing; const rolling = value3?.rolling; const r6 = rolling != null && rolling; const binding = env0_3; binding.useEffect(_fun90814, [r3, value4, value5]); binding.useEffect(_fun90815, [r6, useReducedMotion, value6]); let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle; let closure = DiceRollBarP; object = {useReducedMotion: useReducedMotion, height: value4, opacity: value5}; object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming; object.ANIMATION_DURATION_MS = 300; const DECELERATED_EASING = (NativeModule).DECELERATED_EASING; object.DECELERATED_EASING = DECELERATED_EASING; closure.__closure = object; closure.__workletHash = 2405066513233; closure.__initData = env0_10; const value10 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]); useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle; closure = DiceRollBarY; closure.__closure = {rotation: value6}; closure.__workletHash = 12265072947874; closure.__initData = env0_11; const value11 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]); if (value3 == null) { return null; } const barText = (DiceRollUtilsModule).getBarText(r6, value3.results); const View2 = (ReanimatedRexport).View; const items2 = [value10]; items2[1] = styles.animatedContainer; const View3 = (ReanimatedRexport).View; const DiceIcon = (DiceIconModule).DiceIcon; const view = ( ); const Text = (TextModule).Text; return ( {view} {barText} ); function _fun90814() { // fn#90814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12036:1352, offset: 0x02047965, size: 59 bytes, params: 1, frame: 14 let binding = env0_1; const value2 = 0; binding.set(ReactNativeModule.View ? 56 : value2); binding = env0_2; binding.set(ReactNativeModule.View ? 1 : value2); } function _fun90815() { // fn#90815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12036:1408, offset: 0x020479a0, size: 172 bytes, params: 1, frame: 23 var binding; var set; var withRepeat; var moduleValue; var withTiming; var object; var value; if (env0_5) { if (useReducedMotion) { env0_3.set(0); } else { binding = env0_3; set = binding.set; value = environment.__proto__; value = require(4017) /* metro dependency 4017: ReanimatedRexport */; withRepeat = value.withRepeat; moduleValue = require(4504) /* metro dependency 4504: timing */; withTiming = moduleValue.withTiming; object = {duration: 800}; object.easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.linear; Reflect.apply(set, binding, [Reflect.apply(withRepeat, value, [Reflect.apply(withTiming, moduleValue, [360, object]), -1, false])]); } } else { env0_3.set(0); } } function DiceRollBarP() { // fn#90816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12036:1579, owner: DiceRollBar.p, offset: 0x02047a4c, size: 210 bytes, params: 1, frame: 22 var value2; var moduleValue; var withTiming; var binding; const DECELERATED_EASING = (NativeModule).DECELERATED_EASING; var moduleValue2; const object = {}; if (useReducedMotion) { binding = env0_1; object.height = binding.get(); binding = env0_2; object.opacity = binding.get(); } else { value2 = environment.__proto__; moduleValue = require(4504) /* metro dependency 4504: timing */; withTiming = moduleValue.withTiming; binding = env0_1; object.height = Reflect.apply(withTiming, moduleValue, [binding.get(), {duration: 300, easing: DECELERATED_EASING}]); moduleValue2 = require(4504) /* metro dependency 4504: timing */; withTiming = moduleValue2.withTiming; binding = env0_2; object.opacity = Reflect.apply(withTiming, moduleValue2, [binding.get(), {duration: 300, easing: DECELERATED_EASING}]); } return object; } function DiceRollBarY() { // fn#90817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12036:2040, owner: DiceRollBar.y, offset: 0x02047b1e, size: 68 bytes, params: 1, frame: 15 const object2 = {}; object2.rotate = '' + env0_3.get() + 'deg'; return {transform: [object2]}; } } } global.__d(_fun90811, 11850, [31, 27, 4502, 11526, 33, 4501, 697, 566, 4017, 4504, 1305, 11851, 11852, 4573, 2]) /* metro module 11850, dependencies: [31, 27, 4502, 11526, 33, 4501, 697, 566, 4017, 4504, 1305, 11851, 11852, 4573, 2] */;