50 lines
2.5 KiB
JavaScript
50 lines
2.5 KiB
JavaScript
// Metro module 1781 (f1782).
|
|
import * as _Module1610 from "./Module1610";
|
|
import { shouldBeUseWeb, isJest, isChromeDebugger, isFabric } from "./Module1609";
|
|
const dispatchCommandFabric = function dispatchCommandFabric(a0, a1, r5 = []) {
|
|
if (_WORKLET) {
|
|
const r11 = a0();
|
|
if (r11) {
|
|
global._dispatchCommandFabric(r11, a1, r5);
|
|
} else {
|
|
_Module1610.logger.warn(`Tried to dispatch command "${a1}" with an uninitialized ref. Make sure to pass the animated ref to the component before using it.`);
|
|
}
|
|
}
|
|
};
|
|
dispatchCommandFabric.__closure = {
|
|
logger: _Module1610.logger
|
|
};
|
|
dispatchCommandFabric.__workletHash = 9994297174981;
|
|
dispatchCommandFabric.__initData = {
|
|
code: "function dispatchCommandFabric_Pnpm_dispatchCommandTs1(animatedRef,commandName,args=[]){const{logger}=this.__closure;if(!_WORKLET){return;}const shadowNodeWrapper=animatedRef();if(!shadowNodeWrapper){logger.warn(\"Tried to dispatch command \\\"\"+commandName+\"\\\" with an uninitialized ref. Make sure to pass the animated ref to the component before using it.\");return;}global._dispatchCommandFabric(shadowNodeWrapper,commandName,args);}"
|
|
};
|
|
let r19 = function dispatchCommandPaper(a0, a1, r8 = []) {
|
|
if (_WORKLET) {
|
|
const r6 = a0();
|
|
if (r6 < 0) {
|
|
_Module1610.logger.warn(`Tried to dispatch command "${a1}" with an uninitialized ref. Make sure to pass the animated ref to the component before using it.`);
|
|
} else {
|
|
global._dispatchCommandPaper(r6, a1, r8);
|
|
}
|
|
}
|
|
};
|
|
r19.__closure = {
|
|
logger: _Module1610.logger
|
|
};
|
|
r19.__workletHash = 16962176072769;
|
|
r19.__initData = {
|
|
code: "function dispatchCommandPaper_Pnpm_dispatchCommandTs2(animatedRef,commandName,args=[]){const{logger}=this.__closure;if(!_WORKLET){return;}const viewTag=animatedRef();if(viewTag<0){logger.warn(\"Tried to dispatch command \\\"\"+commandName+\"\\\" with an uninitialized ref. Make sure to pass the animated ref to the component before using it.\");return;}global._dispatchCommandPaper(viewTag,commandName,args);}"
|
|
};
|
|
if (shouldBeUseWeb()) {
|
|
r19 = isJest() ? function dispatchCommandJest() {
|
|
_Module1610.logger.warn("dispatchCommand() is not supported with Jest.");
|
|
} : isChromeDebugger() ? function dispatchCommandChromeDebugger() {
|
|
_Module1610.logger.warn("dispatchCommand() is not supported with Chrome Debugger.");
|
|
} : function dispatchCommandDefault() {
|
|
_Module1610.logger.warn("dispatchCommand() is not supported on this configuration.");
|
|
};
|
|
} else if (isFabric()) {
|
|
r19 = dispatchCommandFabric;
|
|
}
|
|
export { r19 as dispatchCommand };
|