decord/source/433_defaultHiddenStyle.js

185 lines
7.2 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 433
// Function ID: 434
// Name: defaultHiddenStyle
// Dependencies: [32, 19, 21, 68, 434, 435, 436, 70, 254]
// Module 433 (defaultHiddenStyle)
2026-08-24 06:08:38 +00:00
import __INTERNAL_VIEW_CONFIGDefault from "__INTERNAL_VIEW_CONFIG" /* 434 */;
import closure_3 from "_slicedToArray" /* 32 */;
import importAllResult from "noop" /* 19 */;
import noop from "noop" /* 19 */;
import { jsx } from "jsxProd" /* 21 */;
import importDefaultResult2 from "__INTERNAL_VIEW_CONFIG" /* 435 */;
2026-07-29 08:29:29 +00:00
let c0 = arg1;
let c1 = importDefault;
function defaultHiddenStyle(height) {
return { minHeight: height.height, minWidth: height.width };
}
let c4 = importAllResult;
({ startTransition: c5, useState: closure_6 } = noop);
if (importDefaultResult.hasViewManagerConfig("VirtualView")) {
if (!importDefaultResult1.hasViewManagerConfig("VirtualViewExperimental")) {
2026-08-24 06:08:38 +00:00
let importDefaultResult2 = __INTERNAL_VIEW_CONFIGDefault;
2026-07-29 08:29:29 +00:00
}
let c9 = null;
c0 = null;
c1 = false;
exports.default = importAllResult.forwardRef(function VirtualView_withRef(hiddenStyle, ref) {
hiddenStyle = hiddenStyle.hiddenStyle;
if (hiddenStyle === undefined) {
2026-08-24 06:08:38 +00:00
hiddenStyle = closure_1_10;
2026-07-29 08:29:29 +00:00
}
({ nativeID, style, onModeChange: closure_1 } = hiddenStyle);
c2 = undefined;
2026-08-24 06:08:38 +00:00
closure_3 = undefined;
closure_4 = undefined;
[tmp2, c2] = closure_1_3(closure_1_6(hiddenStyle), 2);
closure_3 = tmp3;
obj = obj(closure_1_2[6]);
2026-07-29 08:29:29 +00:00
closure_4 = obj.useVirtualViewLogging(tmp3, nativeID);
obj = { initialHidden: callback, nativeID, ref, removeClippedSubviews: hiddenStyle.removeClippedSubviews, renderState: tmp3 ? VirtualViewRenderState.None : VirtualViewRenderState.Rendered, style: null, onModeChange: null, children: null };
VirtualViewRenderState = globalThis.VirtualViewRenderState;
let composeResult = style;
2026-08-24 06:08:38 +00:00
if (tmp2 !== closure_1_9) {
2026-07-29 08:29:29 +00:00
composeResult = callback(tmp4[8]).compose(style, callback(tmp4[7])(tmp2));
const obj3 = callback(tmp4[8]);
}
obj[5] = composeResult;
obj[6] = function onModeChange(nativeEvent) {
2026-08-24 06:08:38 +00:00
closure_0 = nativeEvent;
const tmpResult = closure_1_1(_undefined[7])(globalThis.VirtualViewMode.cast(nativeEvent.nativeEvent.mode));
obj = { mode: tmpResult, renderState: closure_3 ? VirtualViewRenderState.None : VirtualViewRenderState.Rendered, target: nativeEvent.currentTarget, targetRect: nativeEvent.nativeEvent.targetRect, thresholdRect: nativeEvent.nativeEvent.thresholdRect };
2026-07-29 08:29:29 +00:00
VirtualViewRenderState = globalThis.VirtualViewRenderState;
const current = ref.current;
if (current != null) {
current.logModeChange(obj);
}
let bindResult = null;
if (null != closure_1) {
bindResult = closure_1.bind(null, obj);
}
closure_1 = bindResult;
if (tmpResult !== globalThis.VirtualViewMode.Visible) {
if (tmpResult !== globalThis.VirtualViewMode.Prerender) {
if (tmpResult !== globalThis.VirtualViewMode.Hidden) {
const _Error = Error;
throw Error("Match: No case succesfully matched. Make exhaustive or add a wildcard case using '_'. Argument: " + tmpResult);
} else {
2026-08-24 06:08:38 +00:00
closure_1_5(() => {
obj = nativeEvent(nativeEvent.nativeEvent.targetRect);
2026-07-29 08:29:29 +00:00
if (obj == null) {
obj = {};
}
2026-08-24 06:08:38 +00:00
closure_1_2(obj);
2026-07-29 08:29:29 +00:00
if (bindResult != null) {
bindResult();
}
});
}
} else {
2026-08-24 06:08:38 +00:00
closure_1_5(() => {
closure_1_2(closure_2_9);
2026-07-29 08:29:29 +00:00
if (bindResult != null) {
bindResult();
}
});
}
} else {
2026-08-24 06:08:38 +00:00
_undefined(closure_1_9);
2026-07-29 08:29:29 +00:00
if (bindResult != null) {
bindResult();
}
}
};
let children = null;
2026-08-24 06:08:38 +00:00
if (tmp2 === closure_1_9) {
2026-07-29 08:29:29 +00:00
children = hiddenStyle.children;
}
obj[7] = children;
2026-08-24 06:08:38 +00:00
return closure_1_7(closure_1_8, obj);
2026-07-29 08:29:29 +00:00
});
exports.createHiddenVirtualView = function createHiddenVirtualView(arg0) {
let obj = arg0;
if (arg0 == null) {
obj = {};
}
2026-08-24 06:08:38 +00:00
closure_1 = obj !== c9;
2026-07-29 08:29:29 +00:00
return importAllResult.forwardRef(function VirtualView_withRef(hiddenStyle, ref) {
hiddenStyle = hiddenStyle.hiddenStyle;
if (hiddenStyle === undefined) {
2026-08-24 06:08:38 +00:00
hiddenStyle = closure_1_10;
2026-07-29 08:29:29 +00:00
}
({ nativeID, style, onModeChange: closure_1 } = hiddenStyle);
c2 = undefined;
2026-08-24 06:08:38 +00:00
closure_3 = undefined;
closure_4 = undefined;
[tmp2, c2] = closure_1_3(closure_1_6(hiddenStyle), 2);
closure_3 = tmp3;
obj = obj(closure_1_2[6]);
2026-07-29 08:29:29 +00:00
closure_4 = obj.useVirtualViewLogging(tmp3, nativeID);
obj = { initialHidden: callback, nativeID, ref, removeClippedSubviews: hiddenStyle.removeClippedSubviews, renderState: tmp3 ? VirtualViewRenderState.None : VirtualViewRenderState.Rendered, style: null, onModeChange: null, children: null };
VirtualViewRenderState = globalThis.VirtualViewRenderState;
let composeResult = style;
2026-08-24 06:08:38 +00:00
if (tmp2 !== closure_1_9) {
2026-07-29 08:29:29 +00:00
composeResult = callback(tmp4[8]).compose(style, callback(tmp4[7])(tmp2));
const obj3 = callback(tmp4[8]);
}
obj[5] = composeResult;
obj[6] = function onModeChange(nativeEvent) {
2026-08-24 06:08:38 +00:00
closure_0 = nativeEvent;
const tmpResult = closure_1_1(_undefined[7])(globalThis.VirtualViewMode.cast(nativeEvent.nativeEvent.mode));
obj = { mode: tmpResult, renderState: closure_3 ? VirtualViewRenderState.None : VirtualViewRenderState.Rendered, target: nativeEvent.currentTarget, targetRect: nativeEvent.nativeEvent.targetRect, thresholdRect: nativeEvent.nativeEvent.thresholdRect };
2026-07-29 08:29:29 +00:00
VirtualViewRenderState = globalThis.VirtualViewRenderState;
const current = ref.current;
if (current != null) {
current.logModeChange(obj);
}
let bindResult = null;
if (null != closure_1) {
bindResult = closure_1.bind(null, obj);
}
closure_1 = bindResult;
if (tmpResult !== globalThis.VirtualViewMode.Visible) {
if (tmpResult !== globalThis.VirtualViewMode.Prerender) {
if (tmpResult !== globalThis.VirtualViewMode.Hidden) {
const _Error = Error;
throw Error("Match: No case succesfully matched. Make exhaustive or add a wildcard case using '_'. Argument: " + tmpResult);
} else {
2026-08-24 06:08:38 +00:00
closure_1_5(() => {
obj = nativeEvent(nativeEvent.nativeEvent.targetRect);
2026-07-29 08:29:29 +00:00
if (obj == null) {
obj = {};
}
2026-08-24 06:08:38 +00:00
closure_1_2(obj);
2026-07-29 08:29:29 +00:00
if (bindResult != null) {
bindResult();
}
});
}
} else {
2026-08-24 06:08:38 +00:00
closure_1_5(() => {
closure_1_2(closure_2_9);
2026-07-29 08:29:29 +00:00
if (bindResult != null) {
bindResult();
}
});
}
} else {
2026-08-24 06:08:38 +00:00
_undefined(closure_1_9);
2026-07-29 08:29:29 +00:00
if (bindResult != null) {
bindResult();
}
}
};
let children = null;
2026-08-24 06:08:38 +00:00
if (tmp2 === closure_1_9) {
2026-07-29 08:29:29 +00:00
children = hiddenStyle.children;
}
obj[7] = children;
2026-08-24 06:08:38 +00:00
return closure_1_7(closure_1_8, obj);
2026-07-29 08:29:29 +00:00
});
};
exports._logs = {};
}