{"version":3,"file":"index.mjs","sources":["../../../src/runtime/utils/constants.ts","../../../src/runtime/components/native-text.ts","../../../src/runtime/components/native-view.ts","../../../src/runtime/components/native-view-with-context.ts","../../../src/runtime/components/native-image.ts","../../../src/runtime/components/native-activity-indicator.ts","../../../src/runtime/index.ts"],"sourcesContent":["/**\n * Maps CSS-like `userSelect` values to React Native's `selectable` prop.\n */\nexport const userSelectToSelectableMap = {\n  auto: true,\n  text: true,\n  none: false,\n  contain: true,\n  all: true,\n};\n\n/**\n * Maps CSS-like `verticalAlign` values to React Native's `textAlignVertical`.\n */\nexport const verticalAlignToTextAlignVerticalMap = {\n  auto: 'auto',\n  top: 'top',\n  bottom: 'bottom',\n  middle: 'center',\n};\n\n/**\n * Clamps a `numberOfLines` value exactly as `Text` does at runtime: a negative number (or `NaN`) becomes\n * `0`, while `null`/`undefined` pass through untouched (`!(value >= 0)` is `true` for negatives and `NaN`,\n * `false` otherwise).\n */\nexport const clampNumberOfLines = (value?: number | null): number | null | undefined =>\n  value != null && !(value >= 0) ? 0 : value;\n","/* eslint-disable @typescript-eslint/no-require-imports,unicorn/prefer-module */\n\nimport type { ComponentType } from 'react';\nimport type { TextProps } from 'react-native';\n\nconst reactNative = require('react-native');\nconst isWeb = reactNative.Platform.OS === 'web';\n\nlet nativeText = reactNative.unstable_NativeText;\n\nif (isWeb || nativeText == null) {\n  nativeText = reactNative.Text;\n}\n\n/**\n * Native Text component with graceful fallback.\n */\nexport const NativeText: ComponentType<TextProps> = nativeText;\n","/* eslint-disable @typescript-eslint/no-require-imports,unicorn/prefer-module */\n\nimport type { ComponentType } from 'react';\nimport type { ViewProps } from 'react-native';\n\nconst reactNative = require('react-native');\nconst isWeb = reactNative.Platform.OS === 'web';\n\nlet nativeView = reactNative.unstable_NativeView;\n\nif (isWeb || nativeView == null) {\n  nativeView = reactNative.View;\n}\n\n/**\n * Native View component with graceful fallback.\n */\nexport const NativeView: ComponentType<ViewProps> = nativeView;\n","import { use } from 'react';\nimport { jsx } from 'react/jsx-runtime';\nimport type { ComponentPropsWithRef, ComponentType } from 'react';\nimport * as reactNativeModule from 'react-native';\nimport { NativeView } from './native-view';\n\nconst { View, unstable_TextAncestorContext: TextAncestorContext } = reactNativeModule;\n\nexport const NativeViewWithContext: ComponentType<ComponentPropsWithRef<typeof View>> =\n  TextAncestorContext == null || NativeView === View\n    ? View\n    : function NativeViewWithContext(props) {\n        const hasTextAncestor = use(TextAncestorContext);\n        const view = jsx(NativeView, __DEV__ ? { ...props } : props);\n        return hasTextAncestor ? jsx(TextAncestorContext, { value: false, children: view }) : view;\n      };\n","import type { ComponentType } from 'react';\nimport type { ImageProps } from 'react-native';\nimport * as reactNativeModule from 'react-native';\n\ntype ReactNativeImageModule = {\n  Image: ComponentType<ImageProps>;\n  Platform: {\n    OS: string;\n  };\n};\n\nconst { Image, Platform } = reactNativeModule as ReactNativeImageModule;\n\n/**\n * Native Image component with graceful fallback.\n */\nexport const NativeImage: ComponentType<ImageProps> =\n  Platform.OS === 'web' ? Image : ('RCTImageView' as unknown as ComponentType<ImageProps>);\n","import type { ComponentType } from 'react';\nimport type { ActivityIndicatorProps } from 'react-native';\nimport * as reactNativeModule from 'react-native';\n\ntype ReactNativeActivityIndicatorModule = {\n  ActivityIndicator: ComponentType<ActivityIndicatorProps>;\n  Platform: {\n    OS: string;\n  };\n};\n\nconst { ActivityIndicator, Platform } = reactNativeModule as ReactNativeActivityIndicatorModule;\n\n/**\n * Native ActivityIndicator component with graceful fallback.\n */\nexport const NativeActivityIndicator: ComponentType<ActivityIndicatorProps> =\n  Platform.OS === 'android'\n    ? ('AndroidProgressBar' as unknown as ComponentType<ActivityIndicatorProps>)\n    : Platform.OS === 'ios'\n      ? ('RCTActivityIndicatorView' as unknown as ComponentType<ActivityIndicatorProps>)\n      : ActivityIndicator;\n","import {\n  TextProps,\n  TextStyle,\n  StyleSheet,\n  Platform,\n  Image as RNImage,\n  processColor as rnProcessColor,\n} from 'react-native';\nimport type { ActivityIndicatorProps, ColorValue, ProcessedColorValue } from 'react-native';\nimport { GenericStyleProp } from './types';\nimport { userSelectToSelectableMap, verticalAlignToTextAlignVerticalMap } from './utils/constants';\n\nconst imageBaseStyle = { overflow: 'hidden' } as const;\nexport const textDefaultOverflowStyle = { overflow: 'hidden' } as const;\nconst emptyImageSource = { uri: undefined, width: undefined, height: undefined };\nexport const activityIndicatorStyles = {\n  container: { alignItems: 'center', justifyContent: 'center' },\n  small: { width: 20, height: 20 },\n  large: { width: 36, height: 36 },\n} as const;\nlet activityIndicatorSmallProps: { style: (typeof activityIndicatorStyles)['small']; size: 'small' } | undefined;\nlet activityIndicatorLargeProps: { style: (typeof activityIndicatorStyles)['large']; size: 'large' } | undefined;\n\n// Resolve RN's `processColor` once. The `typeof` guard degrades to a passthrough on\n// a non-RN host that lacks it (see {@link processSelectionColor}).\nconst processColor: ((color?: ColorValue | number) => ProcessedColorValue | null | undefined) | undefined =\n  typeof rnProcessColor === 'function' ? rnProcessColor : undefined;\nconst resolveImageAssetSource =\n  typeof RNImage.resolveAssetSource === 'function'\n    ? RNImage.resolveAssetSource.bind(RNImage)\n    : <T>(source: T): T => source;\n\nconst objectFitToResizeMode: Record<string, string> = {\n  'contain': 'contain',\n  'cover': 'cover',\n  'fill': 'stretch',\n  'none': 'none',\n  'scale-down': 'contain',\n};\n\nlet cachedReactNativeMinor: number | null | undefined;\n\n/**\n * The installed React Native minor version (as in `0.<minor>`), or `null` when it cannot be\n * determined — a non-RN host, or a future major where the minor no longer identifies the release.\n * Callers treat `null` as \"the current wrapper behavior\".\n *\n * @remarks\n * This fallback is used only when the Babel plugin cannot resolve the build target. The synchronous\n * native-constants read happens lazily on first use and is memoized.\n *\n * Boost intentionally mirrors release defaults by version. Do not import RN's private feature flags:\n * their paths are unstable, and apps that override private flags must patch Boost or skip optimization.\n */\nfunction getReactNativeMinor(): number | null {\n  if (cachedReactNativeMinor === undefined) {\n    let version: { major?: number; minor?: number } | undefined;\n    try {\n      version = (Platform as { constants?: { reactNativeVersion?: { major?: number; minor?: number } } }).constants\n        ?.reactNativeVersion;\n    } catch {\n      version = undefined;\n    }\n    cachedReactNativeMinor =\n      version != null && version.major === 0 && typeof version.minor === 'number' ? version.minor : null;\n  }\n  return cachedReactNativeMinor;\n}\n\nlet cachedDefaultTextStyle: TextStyle | false | undefined;\n\n/**\n * The default style `Text` prepends to every element's `style` — `{ overflow: 'hidden' }` on RN ≥\n * 0.85, and `undefined` otherwise. The plugin uses this fallback when the build target is unknown.\n */\nexport function getDefaultTextStyle(): TextStyle | undefined {\n  const minor = getReactNativeMinor();\n  cachedDefaultTextStyle ??= minor === null || minor >= 85 ? textDefaultOverflowStyle : false;\n  return cachedDefaultTextStyle || undefined;\n}\n\n/**\n * Whether RN's Android `Image` wrapper lifts a plain OBJECT source's inline `headers` onto the\n * top-level `headers` prop — the only prop Android's `ReactImageView` reads for HTTP headers.\n *\n * True on RN <= 0.84 and >= 0.87, false on RN 0.85/0.86: deleting the legacy wrapper path\n * (react-native#55291) dropped the lift, and react-native#56905 restored it in 0.87.0-rc.0 with no\n * 0.86 backport. Boost tracks the installed version instead of papering over the gap, so an\n * optimized build stays indistinguishable from the wrapper on every supported version.\n *\n * ARRAY sources are unaffected (every version lifts `source[0].headers`), and iOS has no top-level\n * `headers` prop at all — it reads them per source entry natively.\n */\nfunction liftsObjectSourceHeaders(): boolean {\n  const minor = getReactNativeMinor();\n  return minor === null || minor <= 84 || minor >= 87;\n}\n\n/**\n * Whether RN's Android `Image` wrapper propagates a single-entry ARRAY source's intrinsic\n * width/height into the layout style. RN 0.85 introduced this behavior as an enabled-by-default\n * feature flag, and RN 0.86 made it unconditional. RN <= 0.84 does not propagate the dimensions.\n */\nfunction propagatesArraySourceDimensions(): boolean {\n  const minor = getReactNativeMinor();\n  return minor === null || minor >= 85;\n}\n\n/**\n * Gates a plain OBJECT source's inline `headers` for the top-level Android `headers` prop when the\n * build target is unknown. See {@link liftsObjectSourceHeaders}.\n */\nexport function processImageObjectSourceHeaders<T>(headers: T): T | undefined {\n  const minor = getReactNativeMinor();\n  if (headers === null && (minor === null || minor >= 85)) return undefined;\n  return liftsObjectSourceHeaders() ? headers : undefined;\n}\n\n/**\n * Gates a single-entry ARRAY source's intrinsic dimensions when the build target is unknown. An\n * `undefined` entry is ignored by style flattening, exactly like the wrapper's `false`.\n * See {@link propagatesArraySourceDimensions}.\n */\nexport function processImageArraySourceDimensions<T>(dimensions: T): T | undefined {\n  return propagatesArraySourceDimensions() ? dimensions : undefined;\n}\n\n/**\n * Normalizes `Text` style values for `NativeText`.\n *\n * @param style - Style prop passed to a text-like component.\n * @param includesDefaultStyle - Build-time release default. Omit it to detect the runtime version.\n * @returns Native text props with the authored style and wrapper overrides preserved.\n * @remarks\n * - Inspects style arrays via `StyleSheet.flatten`, without replacing the authored style\n * - Converts numeric `fontWeight` values to string values\n * - Maps `userSelect` and `verticalAlign` to native-compatible props\n * - Applies the build-time default-style setting, or uses {@link getDefaultTextStyle} as a fallback\n */\nexport function processTextStyle(\n  style: GenericStyleProp<TextStyle>,\n  includesDefaultStyle?: boolean\n): Partial<TextProps> {\n  const defaultTextStyle =\n    includesDefaultStyle === undefined\n      ? getDefaultTextStyle()\n      : includesDefaultStyle\n        ? textDefaultOverflowStyle\n        : undefined;\n  const props: { style?: TextProps['style']; selectable?: boolean } = {};\n  const flattenedStyle = StyleSheet.flatten(style) as TextStyle | undefined;\n  let overrides: { -readonly [Key in keyof TextStyle]: TextStyle[Key] } | undefined;\n\n  if (typeof flattenedStyle?.fontWeight === 'number') {\n    overrides = { fontWeight: String(flattenedStyle.fontWeight) as TextStyle['fontWeight'] };\n  }\n  if (flattenedStyle?.userSelect != null) {\n    props.selectable = userSelectToSelectableMap[flattenedStyle.userSelect];\n    (overrides ??= {}).userSelect = undefined;\n  }\n  if (flattenedStyle?.verticalAlign != null) {\n    overrides ??= {};\n    overrides.textAlignVertical = verticalAlignToTextAlignVerticalMap[\n      flattenedStyle.verticalAlign\n    ] as TextStyle['textAlignVertical'];\n    overrides.verticalAlign = undefined;\n  }\n\n  // The renderer processes every authored entry, then RN's overrides. Do not flatten or cache this shape.\n  // Older RN types exclude recursive readonly arrays, although the renderer accepts them.\n  const normalizedStyle = (overrides ? [style, overrides] : style) as TextProps['style'];\n  if (defaultTextStyle) props.style = [defaultTextStyle, normalizedStyle];\n  else if (normalizedStyle !== undefined) props.style = normalizedStyle;\n  return props;\n}\n\n/**\n * Mirrors the `selectionColor` normalization `Text` performs before handing off to its native host:\n * `selectionColor != null ? processColor(selectionColor) : undefined` (Text.js). Returns a spreadable\n * prop bag so the plugin can inline it at the JSX call site like {@link processTextStyle}.\n *\n * @param selectionColor - The raw `selectionColor` prop (CSS color string, int, or `PlatformColor`).\n * @returns `{ selectionColor }` with the processed value, or an empty object when nothing should be\n *   emitted: a `null`/`undefined` input collapses to `{}`, and a value `processColor` rejects (returns\n *   `undefined`, e.g. an unparseable color string) is likewise omitted, mirroring `Text`'s\n *   `if (_selectionColor !== undefined)` guard. A `null` from `processColor` (a rejected `PlatformColor`)\n *   is preserved, since `Text` forwards that.\n * @remarks\n * No caching: keys are commonly primitives (`'red'`, `0xff0000ff`) that a `WeakMap` rejects, and\n * `processColor` is already cheap. When `processColor` is unavailable (a non-RN host) the raw value is\n * passed through rather than dropped, the least-surprising degradation.\n */\nexport function processSelectionColor(selectionColor?: ColorValue | number | null): {\n  selectionColor?: ColorValue | ProcessedColorValue | null;\n} {\n  if (selectionColor == null) return {};\n  if (processColor === undefined) return { selectionColor };\n  const processed = processColor(selectionColor);\n  return processed === undefined ? {} : { selectionColor: processed };\n}\n\nexport function resolveActivityIndicatorDefault<T>(value: T | undefined, fallback: T): T {\n  return value === undefined ? fallback : value;\n}\n\nexport function processActivityIndicatorStyle(style: ActivityIndicatorProps['style']) {\n  return StyleSheet.compose(activityIndicatorStyles.container, style);\n}\n\nexport function processActivityIndicatorSize(size: ActivityIndicatorProps['size'] = 'small') {\n  if (size === 'small') {\n    return (activityIndicatorSmallProps ??= { style: activityIndicatorStyles.small, size: 'small' });\n  }\n  if (size === 'large') {\n    return (activityIndicatorLargeProps ??= { style: activityIndicatorStyles.large, size: 'large' });\n  }\n  return { style: { height: size, width: size }, size: undefined };\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ImageSourceHelperProps = Record<string, any>;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ImageSource = Record<string, any>;\n\nfunction getImageSourcesFromProps(props: ImageSourceHelperProps): ImageSource | ImageSource[] | undefined {\n  const source = resolveImageAssetSource(props.source);\n  const headers: Record<string, string> = {};\n\n  if (props.crossOrigin === 'use-credentials') {\n    headers['Access-Control-Allow-Credentials'] = 'true';\n  }\n  if (props.referrerPolicy != null) {\n    headers['Referrer-Policy'] = props.referrerPolicy;\n  }\n\n  if (props.src != null) {\n    return [{ uri: props.src, headers, width: props.width, height: props.height }];\n  }\n  if (source != null && source.uri && Object.keys(headers).length > 0) {\n    const minor = getReactNativeMinor();\n    return [{ ...source, headers: minor === null || minor >= 88 ? { ...headers, ...source.headers } : headers }];\n  }\n  return source;\n}\n\n/**\n * Normalizes dynamic `Image` source/style props for `NativeImage`.\n *\n * @remarks\n * Static Image cases are still rewritten at build time. This helper is only emitted when the source\n * or style cannot be safely flattened by Babel, so it mirrors the RN wrapper's runtime work:\n * `resolveAssetSource`, `src`/request-header synthesis, object-vs-array source style construction,\n * `objectFit`/`resizeMode`, and iOS tint fallback.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function processImageSourceProps(props: ImageSourceHelperProps): Record<string, any> {\n  const source = (getImageSourcesFromProps(props) || emptyImageSource) as ImageSource | ImageSource[];\n  let style;\n  let sources;\n  let headers;\n\n  if (Array.isArray(source)) {\n    // Android's wrapper propagates a single-entry array source's intrinsic width/height into the\n    // layout style; iOS never does. See {@link propagatesArraySourceDimensions} for the version gate.\n    const singleSource = source.length === 1 ? source[0] : undefined;\n    style = [\n      Platform.OS === 'android' &&\n        singleSource != null &&\n        propagatesArraySourceDimensions() && { width: singleSource.width, height: singleSource.height },\n      imageBaseStyle,\n      props.style,\n    ];\n    sources = source;\n    headers = source[0]?.headers;\n  } else {\n    const width = source.width ?? props.width;\n    const height = source.height ?? props.height;\n    style = [{ width, height }, imageBaseStyle, props.style];\n    sources = [source];\n    // An object source's inline headers only reach the top-level Android `headers` prop on the RN\n    // versions whose wrapper lifts them. See {@link liftsObjectSourceHeaders}.\n    headers = liftsObjectSourceHeaders() ? source.headers : undefined;\n  }\n\n  const flattenedStyle = StyleSheet.flatten(style);\n  const objectFit = flattenedStyle?.objectFit;\n  const resizeMode =\n    (typeof objectFit === 'string' ? objectFitToResizeMode[objectFit] : undefined) ||\n    props.resizeMode ||\n    flattenedStyle?.resizeMode ||\n    'cover';\n  const tintColor = Platform.OS === 'android' ? props.tintColor : (props.tintColor ?? flattenedStyle?.tintColor);\n  const result: Record<string, unknown> = {\n    style,\n    source: sources,\n    resizeMode,\n  };\n  const minor = getReactNativeMinor();\n  if (minor !== null && minor < (Platform.OS === 'ios' ? 88 : 85)) {\n    for (const key of ['width', 'height']) {\n      if (Object.hasOwn(props, key)) result[key] = props[key];\n    }\n  }\n  Object.assign(result, tintColor === undefined ? {} : { tintColor });\n\n  if (\n    Platform.OS === 'android' &&\n    headers !== undefined &&\n    (headers !== null || (!Array.isArray(source) && minor !== null && minor < 85))\n  )\n    result.headers = headers;\n\n  return result;\n}\n\n/**\n * The default value `Text` resolves for `accessible` when the prop is omitted: `true` on iOS (text is\n * an accessibility element unless opted out), `false` on Android, and `undefined` elsewhere.\n *\n * @remarks\n * Runtime fallback for the common optimized `<Text>` path (no accessibility props) when the target\n * platform is unknown at build time. When it is known (Metro reports it on the Babel caller), the\n * plugin inlines the literal instead and this is not emitted. Evaluated per render — like `Text`'s own\n * `Platform.select` — rather than hoisted to a constant, so it always reflects the current platform.\n */\nexport const getDefaultTextAccessible = (): boolean | undefined => Platform.select({ ios: true, android: false });\n\n/**\n * Translates Text's ARIA visibility props. The caller applies RN < 0.85's nullish fallback.\n */\nfunction applyAriaHidden(\n  ariaHidden: unknown,\n  accessibilityElementsHidden?: unknown,\n  importantForAccessibility?: unknown\n): { accessibilityElementsHidden: unknown; importantForAccessibility: unknown } {\n  return {\n    accessibilityElementsHidden: ariaHidden === undefined ? accessibilityElementsHidden : ariaHidden,\n    importantForAccessibility: ariaHidden === true ? 'no-hide-descendants' : importantForAccessibility,\n  };\n}\n\n/**\n * Normalizes accessibility and ARIA props for runtime native components, mirroring the reconciliation\n * `Text` performs before handing off to its native host.\n *\n * @param props - Accessibility and ARIA props.\n * @returns Props with normalized accessibility fields.\n * @remarks\n * - Merges `aria-label` with `accessibilityLabel`\n * - Merges ARIA state fields into `accessibilityState`\n * - Reconciles `disabled` with `accessibilityState.disabled` (the explicit `disabled` prop wins)\n * - Translates `aria-hidden` into `accessibilityElementsHidden` / `importantForAccessibility` (see\n *   {@link applyAriaHidden}); `aria-hidden` wins over an explicitly-passed value\n * - Resolves the platform-specific `accessible` default (see {@link getDefaultTextAccessible})\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function processTextAccessibilityProps(props: Record<string, any>): Record<string, any> {\n  const {\n    accessibilityLabel,\n    ['aria-label']: ariaLabel,\n    accessibilityState,\n    ['aria-busy']: ariaBusy,\n    ['aria-checked']: ariaChecked,\n    ['aria-disabled']: ariaDisabled,\n    ['aria-expanded']: ariaExpanded,\n    ['aria-selected']: ariaSelected,\n    ['aria-hidden']: ariaHidden,\n    accessible,\n    disabled,\n    ...restProperties\n  } = props;\n\n  // Merge label props: prefer the aria-label if defined.\n  const normalizedLabel = ariaLabel ?? accessibilityLabel;\n\n  const minor = getReactNativeMinor();\n  const copiesState = minor === null || minor >= 88;\n  const stateDisabled = copiesState ? (ariaDisabled ?? accessibilityState?.disabled) : undefined;\n  const resolvedDisabled = disabled ?? stateDisabled;\n  const needsStateUpdate =\n    resolvedDisabled !== stateDisabled &&\n    ((resolvedDisabled != null && resolvedDisabled !== false) || (stateDisabled != null && stateDisabled !== false));\n  let normalizedState = accessibilityState;\n  if (\n    (copiesState && needsStateUpdate) ||\n    ariaBusy != null ||\n    ariaChecked != null ||\n    ariaDisabled != null ||\n    ariaExpanded != null ||\n    ariaSelected != null\n  ) {\n    normalizedState =\n      normalizedState == null\n        ? {\n            busy: ariaBusy,\n            checked: ariaChecked,\n            disabled: copiesState ? resolvedDisabled : ariaDisabled,\n            expanded: ariaExpanded,\n            selected: ariaSelected,\n          }\n        : {\n            busy: ariaBusy ?? normalizedState.busy,\n            checked: ariaChecked ?? normalizedState.checked,\n            disabled: copiesState ? resolvedDisabled : (ariaDisabled ?? normalizedState.disabled),\n            expanded: ariaExpanded ?? normalizedState.expanded,\n            selected: ariaSelected ?? normalizedState.selected,\n          };\n  }\n\n  // RN 0.85–0.87 mutates conflicting state; 0.88 copies only the five native fields.\n  const legacy = minor !== null && minor < 85;\n  const mergedDisabled = normalizedState?.disabled;\n  const normalizedDisabled = copiesState ? resolvedDisabled : (disabled ?? mergedDisabled);\n  if (\n    !copiesState &&\n    normalizedDisabled !== mergedDisabled &&\n    ((normalizedDisabled != null && normalizedDisabled !== false) ||\n      (mergedDisabled != null && mergedDisabled !== false))\n  ) {\n    if (legacy || normalizedState == null) normalizedState = { ...normalizedState, disabled: normalizedDisabled };\n    else normalizedState.disabled = normalizedDisabled;\n  }\n\n  const { accessibilityElementsHidden: normalizedElementsHidden, importantForAccessibility: normalizedImportant } =\n    applyAriaHidden(\n      legacy && ariaHidden === null ? undefined : ariaHidden,\n      restProperties.accessibilityElementsHidden,\n      restProperties.importantForAccessibility\n    );\n\n  // Resolve `accessible` exactly as `Text` does: opt-out on iOS, off by default on Android. The\n  // Android pressable case (`onPress`/`onLongPress`) never applies — press handlers bail out of\n  // optimization — so an omitted prop falls back to the platform default.\n  const normalizedAccessible = Platform.select({\n    ios: accessible !== false,\n    android: accessible ?? false,\n    default: accessible,\n  });\n\n  const result: Record<string, unknown> = {\n    ...restProperties,\n    accessible: normalizedAccessible,\n    disabled: normalizedDisabled,\n  };\n  if (legacy || normalizedLabel !== undefined) result.accessibilityLabel = normalizedLabel;\n  if (legacy || normalizedState !== undefined) result.accessibilityState = normalizedState;\n  if (legacy || ariaHidden !== undefined) {\n    result.accessibilityElementsHidden = normalizedElementsHidden;\n  }\n  if (legacy || ariaHidden === true) {\n    result.importantForAccessibility = normalizedImportant;\n  }\n  return result;\n}\n\n/**\n * Normalizes accessibility and ARIA props for an optimized `NativeView`, mirroring the reconciliation\n * the `View` wrapper performs before handing off to its native host.\n *\n * @param props - Accessibility and ARIA props.\n * @returns Props with the ARIA cluster translated/aggregated into their native counterparts.\n * @remarks\n * Unlike {@link processTextAccessibilityProps} (the `Text` helper) there is no `accessible` default and no\n * `disabled` reconciliation — the `View` wrapper does neither. A static `tabIndex` is folded to\n * `focusable` at build time; only a dynamic `tabIndex` reaches this helper.\n * - `aria-labelledby` → `accessibilityLabelledBy` (comma-split into a string array)\n * - `aria-label` → `accessibilityLabel`\n * - `aria-live` → `accessibilityLiveRegion` (`'off'` → `'none'`)\n * - `aria-hidden` → `accessibilityElementsHidden` (+ `importantForAccessibility` when strictly `true`)\n * - `tabIndex` → `focusable` (`!tabIndex`)\n * - ARIA state fields aggregated into `accessibilityState` (`ariaX ?? accessibilityState?.x`)\n * - ARIA value fields aggregated into `accessibilityValue` (`ariaX ?? accessibilityValue?.x`)\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function processViewAccessibilityProps(props: Record<string, any>): Record<string, any> {\n  const {\n    accessibilityState,\n    accessibilityValue,\n    ['aria-busy']: ariaBusy,\n    ['aria-checked']: ariaChecked,\n    ['aria-disabled']: ariaDisabled,\n    ['aria-expanded']: ariaExpanded,\n    ['aria-hidden']: ariaHidden,\n    ['aria-label']: ariaLabel,\n    ['aria-labelledby']: ariaLabelledBy,\n    ['aria-live']: ariaLive,\n    ['aria-selected']: ariaSelected,\n    ['aria-valuemax']: ariaValueMax,\n    ['aria-valuemin']: ariaValueMin,\n    ['aria-valuenow']: ariaValueNow,\n    ['aria-valuetext']: ariaValueText,\n    tabIndex,\n    ...restProperties\n  } = props;\n\n  const result = restProperties;\n\n  // Optional chaining (not a bare `!== undefined` guard) so a runtime-null `aria-labelledby` is\n  // skipped rather than throwing on `.split`, exactly as the wrapper does.\n  const parsedAriaLabelledBy = ariaLabelledBy?.split(/\\s*,\\s*/g);\n  if (parsedAriaLabelledBy !== undefined) result.accessibilityLabelledBy = parsedAriaLabelledBy;\n  if (ariaLabel !== undefined) result.accessibilityLabel = ariaLabel;\n  if (ariaLive !== undefined) result.accessibilityLiveRegion = ariaLive === 'off' ? 'none' : ariaLive;\n  if (ariaHidden !== undefined) {\n    result.accessibilityElementsHidden = ariaHidden;\n    if (ariaHidden === true) result.importantForAccessibility = 'no-hide-descendants';\n  }\n  if (tabIndex !== undefined) result.focusable = !tabIndex;\n\n  if (\n    accessibilityState != null ||\n    ariaBusy != null ||\n    ariaChecked != null ||\n    ariaDisabled != null ||\n    ariaExpanded != null ||\n    ariaSelected != null\n  ) {\n    result.accessibilityState = {\n      busy: ariaBusy ?? accessibilityState?.busy,\n      checked: ariaChecked ?? accessibilityState?.checked,\n      disabled: ariaDisabled ?? accessibilityState?.disabled,\n      expanded: ariaExpanded ?? accessibilityState?.expanded,\n      selected: ariaSelected ?? accessibilityState?.selected,\n    };\n  }\n\n  if (\n    accessibilityValue != null ||\n    ariaValueMax != null ||\n    ariaValueMin != null ||\n    ariaValueNow != null ||\n    ariaValueText != null\n  ) {\n    result.accessibilityValue = {\n      max: ariaValueMax ?? accessibilityValue?.max,\n      min: ariaValueMin ?? accessibilityValue?.min,\n      now: ariaValueNow ?? accessibilityValue?.now,\n      text: ariaValueText ?? accessibilityValue?.text,\n    };\n  }\n\n  return result;\n}\n\n/**\n * Normalizes the Image wrapper's accessibility aliases before props reach `NativeImage`.\n *\n * @remarks\n * Image's rules are close to View's ARIA merge, but not identical: `alt` is an accessibilityLabel\n * fallback and also forces `accessible` on. Keep this separate from `processViewAccessibilityProps`\n * so those Image-only precedence rules stay explicit.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function processImageAccessibilityProps(props: Record<string, any>): Record<string, any> {\n  const {\n    alt,\n    accessible,\n    accessibilityLabel,\n    accessibilityLabelledBy,\n    accessibilityState,\n    importantForAccessibility,\n    ['aria-label']: ariaLabel,\n    ['aria-labelledby']: ariaLabelledBy,\n    ['aria-busy']: ariaBusy,\n    ['aria-checked']: ariaChecked,\n    ['aria-disabled']: ariaDisabled,\n    ['aria-expanded']: ariaExpanded,\n    ['aria-hidden']: ariaHidden,\n    ['aria-selected']: ariaSelected,\n    ...restProperties\n  } = props;\n\n  const result = restProperties;\n  const minor = getReactNativeMinor();\n  const modern = minor === null || minor >= 88;\n  if (modern) {\n    for (const key of ['accessible', 'accessibilityLabel', 'accessibilityLabelledBy', 'importantForAccessibility']) {\n      if (Object.hasOwn(props, key)) result[key] = props[key];\n    }\n    if (ariaLabel != null) result.accessibilityLabel = ariaLabel;\n    else if (alt != null && accessibilityLabel == null) result.accessibilityLabel = alt;\n    if (ariaLabelledBy != null) result.accessibilityLabelledBy = ariaLabelledBy;\n    if (Platform.OS === 'ios' && ariaHidden === true) result.accessible = false;\n    else if (alt != null) result.accessible = true;\n    if (Platform.OS !== 'ios' && ariaHidden === true) result.importantForAccessibility = 'no-hide-descendants';\n  } else {\n    const normalizedLabel = ariaLabel ?? accessibilityLabel ?? alt;\n    if (normalizedLabel !== undefined) result.accessibilityLabel = normalizedLabel;\n\n    if (Platform.OS === 'android') {\n      const normalizedLabelledBy = ariaLabelledBy ?? accessibilityLabelledBy;\n      if (normalizedLabelledBy !== undefined) result.accessibilityLabelledBy = normalizedLabelledBy;\n    } else if (accessibilityLabelledBy !== undefined) {\n      result.accessibilityLabelledBy = accessibilityLabelledBy;\n    }\n\n    // RN 0.85 changed Android from undefined checks to nullish checks.\n    if (Platform.OS === 'ios') {\n      if (ariaHidden === true) {\n        result.accessible = false;\n      } else if (alt !== undefined) {\n        result.accessible = true;\n      } else if (accessible !== undefined) {\n        result.accessible = accessible;\n      }\n    } else {\n      const usesUndefinedChecks = minor !== null && minor <= 84;\n      if (usesUndefinedChecks ? alt !== undefined : alt != null) {\n        result.accessible = true;\n      } else if (usesUndefinedChecks ? accessible !== undefined : accessible != null) {\n        result.accessible = accessible;\n      }\n    }\n\n    if (ariaHidden === true && Platform.OS !== 'ios') {\n      result.importantForAccessibility = 'no-hide-descendants';\n    } else if (importantForAccessibility !== undefined) {\n      result.importantForAccessibility = importantForAccessibility;\n    }\n  }\n\n  if (!modern && Platform.OS === 'ios' && accessibilityState !== undefined) {\n    result.accessibilityState = accessibilityState;\n  } else if (\n    accessibilityState != null ||\n    ariaBusy != null ||\n    ariaChecked != null ||\n    ariaDisabled != null ||\n    ariaExpanded != null ||\n    ariaSelected != null\n  ) {\n    result.accessibilityState = {\n      busy: ariaBusy ?? accessibilityState?.busy,\n      checked: ariaChecked ?? accessibilityState?.checked,\n      disabled: ariaDisabled ?? accessibilityState?.disabled,\n      expanded: ariaExpanded ?? accessibilityState?.expanded,\n      selected: ariaSelected ?? accessibilityState?.selected,\n    };\n  }\n\n  return result;\n}\n\nexport * from './types';\nexport * from './utils/constants';\nexport * from './components/native-text';\nexport * from './components/native-view';\nexport { NativeViewWithContext } from './components/native-view-with-context';\nexport { NativeImage } from './components/native-image';\nexport { NativeActivityIndicator } from './components/native-activity-indicator';\n"],"names":["reactNative","isWeb","NativeViewWithContext","Platform","rnProcessColor","RNImage"],"mappings":";;;;;AAGO,MAAM,yBAAA,GAA4B;AAAA,EACvC,IAAA,EAAM,IAAA;AAAA,EACN,IAAA,EAAM,IAAA;AAAA,EACN,IAAA,EAAM,KAAA;AAAA,EACN,OAAA,EAAS,IAAA;AAAA,EACT,GAAA,EAAK;AACP;AAKO,MAAM,mCAAA,GAAsC;AAAA,EACjD,IAAA,EAAM,MAAA;AAAA,EACN,GAAA,EAAK,KAAA;AAAA,EACL,MAAA,EAAQ,QAAA;AAAA,EACR,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