decord/source/1745_isReactRendering.js
2026-07-29 08:29:29 +00:00

102 lines
3.6 KiB
JavaScript

// Module ID: 1745
// Function ID: 1746
// Name: isReactRendering
// Dependencies: [19, 1609]
// Exports: componentWithRef, isFirstReactRender, isReactRendering
// Module 1745 (isReactRendering)
import noop from "noop";
import { forwardRef } from "noop";
import isJest from "isJest";
isJest = isJest.isReact19();
export const isReactRendering = function isReactRendering() {
const __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = constants.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
let owner;
if (__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE != null) {
const A = __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.A;
if (A != null) {
const getOwner = A.getOwner;
if (getOwner != null) {
owner = getOwner();
}
}
}
if (!owner) {
const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = tmp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
let current;
if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED != null) {
const ReactCurrentOwner = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner;
if (ReactCurrentOwner != null) {
current = ReactCurrentOwner.current;
}
}
owner = current;
}
if (!owner) {
const __SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = tmp.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
let current1;
if (__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE != null) {
const ReactCurrentOwner2 = __SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.ReactCurrentOwner;
if (ReactCurrentOwner2 != null) {
current1 = ReactCurrentOwner2.current;
}
}
owner = current1;
}
return owner;
};
export const isFirstReactRender = function isFirstReactRender() {
const __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = constants.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
let owner;
if (__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE != null) {
const A = __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.A;
if (A != null) {
const getOwner = A.getOwner;
if (getOwner != null) {
owner = getOwner();
}
}
}
if (!owner) {
const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = tmp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
let current;
if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED != null) {
const ReactCurrentOwner = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner;
if (ReactCurrentOwner != null) {
current = ReactCurrentOwner.current;
}
}
owner = current;
}
if (!owner) {
const __SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = tmp.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
let current1;
if (__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE != null) {
const ReactCurrentOwner2 = __SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.ReactCurrentOwner;
if (ReactCurrentOwner2 != null) {
current1 = ReactCurrentOwner2.current;
}
}
owner = current1;
}
let tmp5 = owner;
if (owner) {
let alternate;
if (owner != null) {
alternate = owner.alternate;
}
tmp5 = !alternate;
}
return tmp5;
};
export const componentWithRef = function componentWithRef(BottomSheet) {
let noop = BottomSheet;
if (isJest) {
let fn = (ref) => BottomSheet(Object.assign(ref, Object.create(null)), ref.ref);
} else {
fn = forwardRef(BottomSheet);
}
return fn;
};