/** Checks if the current browser is Safari running on an iOS device. */
export function isSafariOnIphone(): boolean
{
    const userAgent = window.navigator.userAgent;
    const isIOS = (/iPad|iPhone|iPod/).test(userAgent) && !('MSStream' in window);
    const isChrome = (/CriOS/).test(userAgent);
    const isOpera = (/OPiOS/).test(userAgent);
    const isSafari = (/Safari/).test(userAgent) && !isChrome && !isOpera;

    if (isIOS && isChrome && !isOpera)
    {
        return false;
    }

    return isIOS && isSafari;
}
