decord/source/__polyfill/10xxx/module_10895.js
github-actions a36fe4ec9c chore: update source for alpha 347.0
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-14 20:04:03 +00:00

40 lines
1.1 KiB
JavaScript

// Module ID: 10895
// Function ID: 10896
// Dependencies: [19]
// Exports: usePropsErrorBoundary
// Module 10895
import noop from "module_19" /* 19 */;
export const usePropsErrorBoundary = function usePropsErrorBoundary(arg0) {
closure_0 = arg0;
const items = [arg0];
const effect = noop.useEffect(() => {
const size = closure_0;
({ defaultIndex, dataLength } = closure_0);
if (typeof defaultIndex === "number") {
if (dataLength > 0) {
const _Error3 = Error;
const error = new Error("DefaultIndex must be in the range of data length.");
throw error;
}
}
if (!size.mode) {
if (!size.vertical) {
if (!size.width) {
const _Error = Error;
const error1 = new Error("`width` must be specified for horizontal carousels.");
throw error1;
}
}
if (size.vertical) {
if (!size.height) {
const _Error2 = Error;
const error2 = new Error("`height` must be specified for vertical carousels.");
throw error2;
}
}
}
}, items);
};