decord/source/1763_unprocessProps.js

82 lines
2.4 KiB
JavaScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 1763
// Function ID: 1764
2026-07-29 08:29:29 +00:00
// Name: unprocessProps
2026-08-15 05:55:55 +00:00
// Dependencies: [1662, 1764]
2026-07-29 08:29:29 +00:00
2026-08-15 05:55:55 +00:00
// Module 1763 (unprocessProps)
2026-08-24 06:08:38 +00:00
import ReanimatedModule2 from "ReanimatedModule" /* 1662 */;
import r from "r" /* 1764 */;
require = arg1;
2026-07-29 08:29:29 +00:00
const dependencyMap = arg6;
function unprocessProps(styleProps) {
2026-08-24 06:08:38 +00:00
const result = r.unprocessColorsInProps(styleProps);
2026-07-29 08:29:29 +00:00
if (Array.isArray(styleProps.boxShadow)) {
const boxShadow = styleProps.boxShadow;
styleProps.boxShadow = boxShadow.map((color) => {
const obj = {};
const merged = Object.assign(color);
obj.color = callback(table[1]).unprocessColor(color.color);
return obj;
});
}
}
2026-08-24 06:08:38 +00:00
let obj = {
viewsCount: 0,
viewsMap: new Map(),
intervalId: null,
registerView(componentViewTag, self) {
self = this;
const viewsMap = this.viewsMap;
if (!viewsMap.has(componentViewTag)) {
const viewsMap2 = self.viewsMap;
const result = viewsMap2.set(componentViewTag, self);
self.viewsCount = self.viewsCount + 1;
if (1 === self.viewsCount) {
self.registerInterval();
}
2026-07-29 08:29:29 +00:00
}
2026-08-24 06:08:38 +00:00
},
unregisterView(portal) {
const self = this;
const viewsMap = this.viewsMap;
viewsMap.delete(portal);
this.viewsCount = this.viewsCount - 1;
if (0 === this.viewsCount) {
self.unregisterInterval();
}
},
syncPropsBackToReact() {
const ReanimatedModule = ReanimatedModule2.ReanimatedModule;
const settledUpdates = ReanimatedModule.getSettledUpdates();
const iter = settledUpdates[Symbol.iterator]();
const nextResult = iter.next();
while (iter !== undefined) {
let styleProps = nextResult.styleProps;
let viewsMap = this.viewsMap;
let tmp3 = styleProps;
let value = viewsMap.get(nextResult.viewTag);
let tmp4 = unprocessProps;
let tmp5 = unprocessProps(styleProps);
if (value != null) {
let tmp6 = styleProps;
let result = value._syncStylePropsBackToReact(tmp3);
}
continue;
}
},
registerInterval(arg0) {
const syncPropsBackToReact = this.syncPropsBackToReact;
this.intervalId = setInterval(syncPropsBackToReact.bind(this), 500);
},
unregisterInterval() {
const self = this;
if (null !== this.intervalId) {
const _clearInterval = clearInterval;
clearInterval(self.intervalId);
self.intervalId = null;
2026-07-29 08:29:29 +00:00
}
}
};
arg5.PropsRegistryGarbageCollector = obj;