2026-07-29 08:29:29 +00:00
// Module ID: 328
// Function ID: 329
// Name: _queryCache
// Dependencies: [5, 19, 21, 329, 331, 81, 148, 332, 333, 336, 337, 254]
// Exports: default
// Module 328 (_queryCache)
2026-08-24 06:08:38 +00:00
import resolveAssetSourceDefault from "resolveAssetSource" /* 81 */ ;
import ImageLoaderDefault from "ImageLoader" /* 329 */ ;
2026-09-10 05:38:07 +00:00
import _mod331 from "module_331" /* 331 */ ;
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */ ;
import noop from "module_19" /* 19 */ ;
import get _hairlineWidth from "get hairlineWidth" /* 254 */ ;
2026-07-29 08:29:29 +00:00
2026-09-10 05:38:07 +00:00
require = fn ;
let closure _7 = async function _queryCache ( arg0 , value ) {
if ( c1 === 2 ) {
c1 = 3 ;
throw new TypeError ( "Generator functions may not be called on executing generators" ) ;
} else if ( tmp3 === 3 ) {
if ( arg0 === 1 ) {
throw value ;
} else if ( arg0 === 2 ) {
const obj2 = { value , done : true } ;
return obj2 ;
} else {
return { value : "HermesInternal" , done : null } ;
}
} else {
try {
c1 = 2 ;
if ( arg0 === 1 ) {
c1 = 3 ;
throw value ;
} else if ( arg0 === 2 ) {
c1 = 3 ;
const obj3 = { value , done : true } ;
return obj3 ;
2026-07-29 08:29:29 +00:00
} else {
2026-09-10 05:38:07 +00:00
c1 = 3 ;
const obj4 = { value : ImageLoaderDefault . queryCache ( closure _0 ) , done : true } ;
return obj4 ;
2026-07-29 08:29:29 +00:00
}
2026-09-10 05:38:07 +00:00
} catch ( tmp7 ) {
c1 = tmp ;
throw tmp7 ;
}
2026-07-29 08:29:29 +00:00
}
2026-09-10 05:38:07 +00:00
} ;
const use = fn ( 19 ) . use ;
const jsx = fn ( 21 ) . jsx ;
let closure _6 = 1 ;
2026-09-12 13:45:10 +00:00
let closure _8 = { uri : "justifyContent" , width : "call" , height : "window" } ;
2026-07-29 08:29:29 +00:00
function _BaseImage ( arg0 ) {
( { alt , accessible , aria - labelledby : tmp , aria - busy : tmp2 , aria - checked : tmp3 , aria - disabled : tmp4 , aria - expanded : tmp5 , aria - label : tmp7 , aria - selected : tmp8 , accessibilityLabel , accessibilityLabelledBy , accessibilityState , defaultSource , loadingIndicatorSource , style , onLoadStart , onLoad , onLoadEnd , onError , width , height } = arg0 ) ;
( { ref , aria - hidden : tmp6 , children , source , src , crossOrigin , referrerPolicy , srcSet , resizeMode } = arg0 ) ;
2026-09-10 05:38:07 +00:00
const merged = Object . assign ( arg0 , Object . assign ( { ref : 0 , alt : 0 , accessible : 0 , "aria-labelledby" : 0 , "aria-busy" : 0 , "aria-checked" : 0 , "aria-disabled" : 0 , "aria-expanded" : 0 , "aria-hidden" : 0 , "aria-label" : 0 , "aria-selected" : 0 , accessibilityLabel : 0 , accessibilityLabelledBy : 0 , accessibilityState : 0 , defaultSource : 0 , loadingIndicatorSource : 0 , children : 0 , source : 0 , src : 0 , style : 0 , crossOrigin : 0 , referrerPolicy : 0 , srcSet : 0 , onLoadStart : 0 , onLoad : 0 , onLoadEnd : 0 , onError : 0 , width : 0 , height : 0 , resizeMode : 0 } ) ) ;
const arr = _mod331 . getImageSourcesFromImageProps ( { crossOrigin , referrerPolicy , src , srcSet , width , height , source } ) || closure _8 ;
2026-08-24 06:08:38 +00:00
const tmp13 = resolveAssetSourceDefault ( defaultSource ) ;
const tmp14 = resolveAssetSourceDefault ( loadingIndicatorSource ) ;
2026-07-29 08:29:29 +00:00
if ( null != children ) {
const _Error2 = Error ;
2026-09-10 05:38:07 +00:00
const error = new Error ( "The <Image> component cannot contain children. If you want to render content on top of the image, consider using the <ImageBackground> component or absolute positioning." ) ;
2026-07-29 08:29:29 +00:00
throw error ;
} else {
if ( null != defaultSource ) {
if ( null != loadingIndicatorSource ) {
const _Error = Error ;
const error1 = new Error ( "The <Image> component cannot have defaultSource and loadingIndicatorSource at the same time. Please use either defaultSource or loadingIndicatorSource." ) ;
throw error1 ;
}
}
const _Array = Array ;
if ( Array . isArray ( arr ) ) {
( { headers , width : width3 , height : height3 } = arr [ 0 ] ) ;
if ( null != headers ) {
merged . headers = headers ;
}
let tmp18 = 1 === arr . length ;
if ( tmp18 ) {
2026-09-10 05:38:07 +00:00
const size = { width : width3 , height : height3 } ;
tmp18 = size ;
2026-07-29 08:29:29 +00:00
}
const items = [ tmp18 , closure _9 . base , style ] ;
merged . style = items ;
merged . source = arr ;
} else {
( { width : width2 , height : height2 } = arr ) ;
if ( "" === arr . uri ) {
const _console = console ;
console . warn ( "source.uri should not be an empty string" ) ;
}
if ( width2 == null ) {
width2 = width ;
}
2026-09-10 05:38:07 +00:00
const size1 = { width : width2 , height : null } ;
2026-07-29 08:29:29 +00:00
if ( height2 == null ) {
height2 = height ;
}
2026-09-10 05:38:07 +00:00
size1 . height = height2 ;
const items1 = [ size1 , closure _9 . base , style ] ;
2026-07-29 08:29:29 +00:00
merged . style = items1 ;
const items2 = [ arr ] ;
merged . source = items2 ;
}
if ( null != onLoadStart ) {
merged . shouldNotifyLoadEvents = true ;
merged . onLoadStart = onLoadStart ;
}
if ( null != onLoad ) {
merged . shouldNotifyLoadEvents = true ;
merged . onLoad = onLoad ;
}
if ( null != onLoadEnd ) {
merged . shouldNotifyLoadEvents = true ;
merged . onLoadEnd = onLoadEnd ;
}
if ( null != onError ) {
merged . shouldNotifyLoadEvents = true ;
merged . onError = onError ;
}
if ( tmp20 ) {
merged . defaultSource = tmp13 ;
}
if ( tmp21 ) {
merged . loadingIndicatorSrc = tmp14 ;
}
if ( null != tmp7 ) {
merged . accessibilityLabel = tmp7 ;
} else if ( null != accessibilityLabel ) {
merged . accessibilityLabel = accessibilityLabel ;
} else if ( null != alt ) {
merged . accessibilityLabel = alt ;
}
if ( null != tmp ) {
merged . accessibilityLabelledBy = tmp ;
} else if ( null != accessibilityLabelledBy ) {
merged . accessibilityLabelledBy = accessibilityLabelledBy ;
}
if ( null != alt ) {
merged . accessible = true ;
} else if ( null != accessible ) {
merged . accessible = accessible ;
}
if ( ! tmp22 ) {
if ( tmp2 == null ) {
let busy ;
if ( accessibilityState != null ) {
busy = accessibilityState . busy ;
}
}
2026-09-10 05:38:07 +00:00
const obj2 = { busy : tmp2 , checked : null , disabled : null , expanded : null , selected : null } ;
2026-07-29 08:29:29 +00:00
if ( tmp3 == null ) {
let checked ;
if ( accessibilityState != null ) {
checked = accessibilityState . checked ;
}
}
2026-09-10 05:38:07 +00:00
obj2 . checked = tmp3 ;
2026-07-29 08:29:29 +00:00
if ( tmp4 == null ) {
let disabled ;
if ( accessibilityState != null ) {
disabled = accessibilityState . disabled ;
}
}
2026-09-10 05:38:07 +00:00
obj2 . disabled = tmp4 ;
2026-07-29 08:29:29 +00:00
if ( tmp5 == null ) {
let expanded ;
if ( accessibilityState != null ) {
expanded = accessibilityState . expanded ;
}
}
2026-09-10 05:38:07 +00:00
obj2 . expanded = tmp5 ;
2026-07-29 08:29:29 +00:00
if ( tmp8 == null ) {
let selected ;
if ( accessibilityState != null ) {
selected = accessibilityState . selected ;
}
}
2026-09-10 05:38:07 +00:00
obj2 . selected = tmp8 ;
merged . accessibilityState = obj2 ;
2026-07-29 08:29:29 +00:00
}
if ( true === tmp6 ) {
merged . importantForAccessibility = "no-hide-descendants" ;
}
const tmp28 = tmp12 ( 148 ) ( style ) ;
let objectFit ;
if ( tmp28 != null ) {
objectFit = tmp28 . objectFit ;
}
2026-09-10 05:38:07 +00:00
let str4 = tmp10 ( 332 ) . convertObjectFitToResizeMode ( objectFit ) || resizeMode ;
2026-07-29 08:29:29 +00:00
if ( ! str4 ) {
2026-09-10 05:38:07 +00:00
let resizeMode1 ;
2026-07-29 08:29:29 +00:00
if ( tmp28 != null ) {
2026-09-10 05:38:07 +00:00
resizeMode1 = tmp28 . resizeMode ;
2026-07-29 08:29:29 +00:00
}
2026-09-10 05:38:07 +00:00
str4 = resizeMode1 ;
2026-07-29 08:29:29 +00:00
}
if ( ! str4 ) {
str4 = "cover" ;
}
merged . resizeMode = str4 ;
2026-09-10 05:38:07 +00:00
const tmp10Result = tmp10 ( 332 ) ;
tmp20 = null != tmp13 && null != tmp13 . uri ;
tmp21 = null != tmp14 && null != tmp14 . uri ;
tmp22 = null == accessibilityState && null == tmp2 && null == tmp3 && null == tmp4 && null == tmp5 && null == tmp8 ;
const tmp10Result2 = tmp10 ( 333 ) ;
2026-07-29 08:29:29 +00:00
const tmp33 = use ( tmp12 ( 336 ) ) ;
if ( null !== tmp33 ) {
merged . internal _analyticTag = tmp33 ;
}
2026-09-10 05:38:07 +00:00
const obj3 = { } ;
const wrapRefWithImageAttachedCallbacks = tmp10 ( 333 ) . useWrapRefWithImageAttachedCallbacks ( ref ) ;
2026-07-29 08:29:29 +00:00
const merged1 = Object . assign ( merged ) ;
2026-09-10 05:38:07 +00:00
obj3 . ref = wrapRefWithImageAttachedCallbacks ;
2026-07-29 08:29:29 +00:00
return jsx ( tmp12 ( 337 ) , { } ) ;
}
}
2026-09-10 05:38:07 +00:00
let unstable _setImageComponentDecorator = fn ( 333 ) ;
unstable _setImageComponentDecorator = unstable _setImageComponentDecorator . unstable _getImageComponentDecorator ( ) ;
2026-07-29 08:29:29 +00:00
let resultResult = _BaseImage ;
2026-09-10 05:38:07 +00:00
if ( null != unstable _setImageComponentDecorator ) {
resultResult = unstable _setImageComponentDecorator ( _BaseImage ) ;
2026-07-29 08:29:29 +00:00
}
resultResult . displayName = "Image" ;
2026-09-10 05:38:07 +00:00
resultResult . getSize = function getSize ( arg0 , fn , arg2 ) {
2026-08-24 06:08:38 +00:00
closure _0 = arg0 ;
2026-09-10 05:38:07 +00:00
closure _1 = fn ;
2026-08-24 06:08:38 +00:00
const size = ImageLoaderDefault . getSize ( arg0 ) ;
2026-08-04 21:03:28 +00:00
if ( typeof fn !== "function" ) {
2026-07-29 08:29:29 +00:00
return size ;
} else {
2026-08-04 21:03:28 +00:00
fn = arg2 ;
2026-07-29 08:29:29 +00:00
if ( ! arg2 ) {
fn = ( ) => {
console . warn ( ` Failed to get size for image: ${ closure _0 } ` ) ;
} ;
}
2026-09-10 05:38:07 +00:00
size . then ( ( width ) => closure _1 ( width . width , width . height ) ) . catch ( fn ) ;
2026-07-29 08:29:29 +00:00
}
} ;
2026-09-10 05:38:07 +00:00
resultResult . getSizeWithHeaders = function getSizeWithHeaders ( arg0 , arg1 , fn , arg3 ) {
2026-08-24 06:08:38 +00:00
closure _0 = arg0 ;
2026-09-10 05:38:07 +00:00
closure _1 = fn ;
2026-08-24 06:08:38 +00:00
const sizeWithHeaders = ImageLoaderDefault . getSizeWithHeaders ( arg0 , arg1 ) ;
2026-08-04 21:03:28 +00:00
if ( typeof fn !== "function" ) {
2026-07-29 08:29:29 +00:00
return sizeWithHeaders ;
} else {
2026-08-04 21:03:28 +00:00
fn = arg3 ;
2026-07-29 08:29:29 +00:00
if ( ! arg3 ) {
fn = ( ) => {
console . warn ( ` Failed to get size for image: ${ closure _0 } ` ) ;
} ;
}
2026-09-10 05:38:07 +00:00
sizeWithHeaders . then ( ( width ) => closure _1 ( width . width , width . height ) ) . catch ( fn ) ;
2026-07-29 08:29:29 +00:00
}
} ;
2026-09-10 05:38:07 +00:00
resultResult . prefetch = function prefetch ( arg0 , fn ) {
2026-08-24 06:08:38 +00:00
closure _6 = tmp + 1 ;
2026-09-10 05:38:07 +00:00
if ( fn ) {
fn ( tmp ) ;
2026-07-29 08:29:29 +00:00
}
2026-09-10 05:38:07 +00:00
return ImageLoaderDefault . prefetchImage ( arg0 , + closure _6 ) ;
2026-07-29 08:29:29 +00:00
} ;
2026-09-10 05:38:07 +00:00
resultResult . prefetchWithMetadata = function prefetchWithMetadata ( arg0 , arg1 , arg2 , fn ) {
2026-08-24 06:08:38 +00:00
closure _6 = tmp + 1 ;
2026-09-10 05:38:07 +00:00
if ( fn ) {
fn ( tmp ) ;
2026-07-29 08:29:29 +00:00
}
2026-08-24 06:08:38 +00:00
return ImageLoaderDefault . prefetchImage ( arg0 , + closure _6 ) ;
2026-07-29 08:29:29 +00:00
} ;
resultResult . abortPrefetch = function abortPrefetch ( _requestId ) {
2026-08-24 06:08:38 +00:00
ImageLoaderDefault . abortRequest ( _requestId ) ;
2026-07-29 08:29:29 +00:00
} ;
2026-09-10 05:38:07 +00:00
resultResult . queryCache = function queryCache ( arg0 ) {
2026-07-29 08:29:29 +00:00
const self = this ;
2026-09-10 05:38:07 +00:00
const apply = closure _7 . apply ;
2026-07-29 08:29:29 +00:00
if ( typeof apply === "unknown" ) {
let applyArgumentsResult = HermesBuiltin . applyArguments ( self ) ;
} else {
applyArgumentsResult = apply ( self , arguments ) ;
}
return applyArgumentsResult ;
} ;
2026-08-24 06:08:38 +00:00
resultResult . resolveAssetSource = resolveAssetSourceDefault ;
2026-09-10 05:38:07 +00:00
let closure _9 = get _hairlineWidth . create ( { base : { overflow : "hidden" } } ) ;
2026-07-29 08:29:29 +00:00
export default resultResult ;