probe = () =>
((mode = ["portrait", "landscape"][+(screen.width > screen.height)]) =>
Object.freeze(
Object.assign(
{
color: query.matches,
depth: screen.colorDepth,
mode
},
/\blandscape\b/i.test(mode)
? {
width: Math.max(screen.availHeight, screen.availWidth),
height: Math.min(screen.availHeight, screen.availWidth)
}
: {
width: screen.availWidth,
height: screen.availHeight
}
)
))(screen.orientation?.type)