export const REGEX_BASE_URL = /^(https?:\/\/[^?]+)/;

export const CUSTOM_WEBVIEW_URIS = ['https://www.google.com/maps/embed'];

export const YOUTUBE_PATTERNS = [
  // youtube.com/watch?v=VIDEO_ID or youtu.be/VIDEO_ID
  /(?:youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9_-]{11})(?:\?|&|\/|$)/,
  // youtube.com/v/VIDEO_ID or youtu.be/v/VIDEO_ID
  /(?:youtube\.com\/v\/|youtu\.be\/v\/)([a-zA-Z0-9_-]{11})(?:\?|&|\/|$)/,
  // youtube.com/embed/VIDEO_ID or youtu.be/embed/VIDEO_ID
  /(?:youtube\.com\/embed\/|youtu\.be\/embed\/)([a-zA-Z0-9_-]{11})(?:\?|&|\/|$)/,
];

export const ASPECT_RATIO_16_9 = 0.5625;

export const MAX_SAFE_BODY_LENGTH = 150000;
