decord/source/1677_JSPropsUpdaterPaper.js

149 lines
5.1 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 1677
2026-07-25 08:10:48 +00:00
// Function ID: 18588
2026-07-20 16:05:17 +00:00
// Name: JSPropsUpdaterPaper
2026-07-23 10:11:24 +00:00
// Dependencies: [6, 7, 27, 1585, 1589]
2026-07-20 16:05:17 +00:00
// Module 1677 (JSPropsUpdaterPaper)
2026-07-23 10:11:24 +00:00
import _classCallCheck from "_classCallCheck";
import _defineProperties from "_defineProperties";
import get_ActivityIndicator from "get ActivityIndicator";
import isJest from "isJest";
2026-07-20 16:05:17 +00:00
let Platform;
2026-07-23 10:11:24 +00:00
let closure_5;
const require = arg1;
({ NativeEventEmitter: closure_5, Platform } = get_ActivityIndicator);
isJest = isJest.shouldBeUseWeb();
let tmp4 = (() => {
2026-07-20 16:05:17 +00:00
class JSPropsUpdaterPaper {
constructor() {
2026-07-23 10:11:24 +00:00
tmp = outer1_3(this, JSPropsUpdaterPaper);
tmp2 = new outer1_5(undefined);
2026-07-20 16:05:17 +00:00
this._reanimatedEventEmitter = tmp2;
return;
}
}
let obj = {
key: "addOnJSPropsChangeListener",
value: function addOnJSPropsChangeListener(getComponentViewTag) {
2026-07-23 10:11:24 +00:00
let _tagToComponentMapping = JSPropsUpdaterPaper._tagToComponentMapping;
2026-07-20 16:05:17 +00:00
const result = _tagToComponentMapping.set(getComponentViewTag.getComponentViewTag(), getComponentViewTag);
if (1 === JSPropsUpdaterPaper._tagToComponentMapping.size) {
const self = this;
const _reanimatedEventEmitter = this._reanimatedEventEmitter;
_reanimatedEventEmitter.addListener("onReanimatedPropsChange", function listener(viewTag) {
2026-07-23 10:11:24 +00:00
const _tagToComponentMapping = outer1_0._tagToComponentMapping;
2026-07-20 16:05:17 +00:00
const value = _tagToComponentMapping.get(viewTag.viewTag);
if (null != value) {
value._updateFromNative(viewTag.props);
}
});
}
}
};
const items = [obj, ];
obj = {
key: "removeOnJSPropsChangeListener",
value: function removeOnJSPropsChangeListener(getComponentViewTag) {
const _tagToComponentMapping = JSPropsUpdaterPaper._tagToComponentMapping;
_tagToComponentMapping.delete(getComponentViewTag.getComponentViewTag());
if (0 === JSPropsUpdaterPaper._tagToComponentMapping.size) {
const self = this;
const _reanimatedEventEmitter = this._reanimatedEventEmitter;
_reanimatedEventEmitter.removeAllListeners("onReanimatedPropsChange");
}
}
};
items[1] = obj;
return callback(JSPropsUpdaterPaper, items);
2026-07-23 10:11:24 +00:00
})();
2026-07-20 16:05:17 +00:00
tmp4._tagToComponentMapping = new Map();
let closure_6 = { code: "function pnpm_JSPropsUpdaterTs1(){const{runOnJS,updater}=this.__closure;global.updateJSProps=function(viewTag,props){runOnJS(updater)(viewTag,props);};}" };
2026-07-23 10:11:24 +00:00
const tmp6 = (() => {
2026-07-20 16:05:17 +00:00
class JSPropsUpdaterFabric {
constructor() {
2026-07-23 10:11:24 +00:00
tmp = outer1_3(this, updater);
2026-07-20 16:05:17 +00:00
if (!updater.isInitialized) {
updater = function updater(value, props) {
const _tagToComponentMapping = updater._tagToComponentMapping;
value = _tagToComponentMapping.get(value);
if (null != value) {
value._updateFromNative(props);
}
};
2026-07-23 10:11:24 +00:00
tmp2 = outer1_1;
tmp3 = outer1_2;
2026-07-20 16:05:17 +00:00
num = 4;
2026-07-23 10:11:24 +00:00
obj = outer1_1(outer1_2[4]);
2026-07-20 16:05:17 +00:00
pnpm_JSPropsUpdaterTs1 = /* worklet (recovered source) */ function pnpm_JSPropsUpdaterTs1(){const{runOnJS,updater}=this.__closure;global.updateJSProps=function(viewTag,props){runOnJS(updater)(viewTag,props);};};
obj = {};
2026-07-23 10:11:24 +00:00
obj.runOnJS = outer1_1(outer1_2[4]).runOnJS;
2026-07-20 16:05:17 +00:00
obj.updater = updater;
pnpm_JSPropsUpdaterTs1.__closure = obj;
num2 = 2068327241111;
pnpm_JSPropsUpdaterTs1.__workletHash = 2068327241111;
2026-07-23 10:11:24 +00:00
tmp4 = outer1_6;
pnpm_JSPropsUpdaterTs1.__initData = outer1_6;
2026-07-20 16:05:17 +00:00
tmp5 = obj.runOnUIImmediately(pnpm_JSPropsUpdaterTs1)();
tmp6 = updater;
flag = true;
updater.isInitialized = true;
}
return;
}
}
let obj = {
key: "addOnJSPropsChangeListener",
value: function addOnJSPropsChangeListener(getComponentViewTag) {
if (JSPropsUpdaterFabric.isInitialized) {
const _tagToComponentMapping = JSPropsUpdaterFabric._tagToComponentMapping;
const result = _tagToComponentMapping.set(getComponentViewTag.getComponentViewTag(), getComponentViewTag);
}
}
};
const items = [obj, ];
obj = {
key: "removeOnJSPropsChangeListener",
value: function removeOnJSPropsChangeListener(getComponentViewTag) {
if (JSPropsUpdaterFabric.isInitialized) {
const _tagToComponentMapping = JSPropsUpdaterFabric._tagToComponentMapping;
_tagToComponentMapping.delete(getComponentViewTag.getComponentViewTag());
}
}
};
items[1] = obj;
return callback(JSPropsUpdaterFabric, items);
2026-07-23 10:11:24 +00:00
})();
2026-07-20 16:05:17 +00:00
const map = new Map();
tmp6._tagToComponentMapping = new Map();
tmp6.isInitialized = false;
2026-07-23 10:11:24 +00:00
if (isJest) {
tmp4 = (() => {
2026-07-20 16:05:17 +00:00
class JSPropsUpdaterWeb {
constructor() {
2026-07-23 10:11:24 +00:00
tmp = outer1_3(this, JSPropsUpdaterWeb);
2026-07-20 16:05:17 +00:00
return;
}
}
let obj = {
key: "addOnJSPropsChangeListener",
value: function addOnJSPropsChangeListener(arg0) {
}
};
const items = [obj, ];
obj = {
key: "removeOnJSPropsChangeListener",
value: function removeOnJSPropsChangeListener(arg0) {
}
};
items[1] = obj;
return callback(JSPropsUpdaterWeb, items);
2026-07-23 10:11:24 +00:00
})();
2026-07-20 16:05:17 +00:00
} else if (global._IS_FABRIC) {
tmp4 = tmp6;
}
export default tmp4;