{"version":3,"sources":["../../src/max-length/index.ts"],"sourcesContent":["// noinspection UnnecessaryLocalVariableJS,JSUnusedGlobalSymbols\n\n/**\n * A Universally Unique Identifier (UUID) is a 36-character alphanumeric string that's typically represented in the following format:\n * - Format: 8-4-4-4-12\n * */\nexport const UUID = 36;\n\n/**\n * The length of an Apple device's unique device identifier (UDID) depends on the model of the device:\n * - iPhone X and earlier: The UDID is a 40-character alphanumeric string\n * - iPhone XS and later: The UDID is a 24-character string with a dash after the 8th digit\n * */\nexport const UDID = 40;\n\n/**\n * Apple's Identifier for Vendors (IDFV).\n * - `var identifierForVendor: UUID? { get }` An alphanumeric string that uniquely identifies a device to the app’s vendor.\n * - Reference: [identifierForVendor](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor)\n *  */\nexport const IDFV = UUID;\n\n/**\n * Apple's Identifier for Advertisers (IDFA).\n * - `var advertisingIdentifier: UUID { get }` The UUID that is specific to a device.\n * - Reference: [advertisingIdentifier](https://developer.apple.com/documentation/adsupport/asidentifiermanager/advertisingidentifier)\n * */\nexport const IDFA = UUID;\n\n/**\n * Android Device ID\n * - 64-bit number (expressed as a hexadecimal string)\n * - Reference: [ANDROID_ID](https://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID)\n * */\nexport const ANDROID_ID = 16;\n\n/**\n * - Web Device ID: UUID v4\n * - iOS Device ID: IDFV\n * - Android Device ID: ANDROID_ID\n * */\nexport const DEVICE_ID = Math.max(UUID, IDFV, ANDROID_ID); // 36\n\n/**\n * - The advertising ID is represented using version 3 of the universally unique identifier (UUID) format or an equivalent 128-bit format.\n * - If this permission is not declared, the returned value will be 00000000-0000-0000-0000-000000000000 starting early 2022.\n * - Reference: [AD_ID](https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info#public-string-getid)\n * */\nexport const AAID = UUID;\n\n/**\n * - Web: UUID\n * - iOS: IDFA\n * - Android: AAID\n * */\nexport const ADVERTISING_ID = Math.max(UUID, IDFA, AAID); // 36\n\n/**\n * - An IPv4 address is at most 4 sets of 3 numbers (12 characters), each set separated by a dot (.). That makes 15 characters.\n * - An IPv6 address, at its longest, would be 8 sets of 4 characters (32 total), each set separated by a colon. That makes 39 characters.\n * */\nexport const IPv4 = 15;\nexport const IPv6 = 39;\nexport const IPv4_MAPPED_IPv6 = 45;\nexport const IP = Math.max(IPv4, IPv6, IPv4_MAPPED_IPv6); // 45\n\n/**\n * - The longest string in the database is America/Argentina/ComodRivadavia. It's 32 characters long.\n * - The mysql.time_zone_name table has a Name column defined with 64 characters.\n * - It makes sense to use VARCHAR(64) for storing this information.\n * - Reference: [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)\n * */\nexport const TIMEZONE_LONGEST = 'America/Argentina/ComodRivadavia'.length;\nexport const TIMEZONE = Math.max(64, TIMEZONE_LONGEST); // 64\n\n/**\n * Reference: [List of ISO 3166 country codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)\n * */\nexport const COUNTRY_CODE_ALPHA_2 = 2; // US\nexport const COUNTRY_CODE_ALPHA_3 = 3; // USA\nexport const COUNTRY_CODE = Math.max(COUNTRY_CODE_ALPHA_2, COUNTRY_CODE_ALPHA_3); // 3\n\n/**\n * Reference: [RFC5646 Tags for Identifying Languages](https://www.rfc-editor.org/rfc/rfc5646#section-4.4.1)\n * The following illustration shows how the 35-character recommendation was derived:\n * ```\n * language      =  8 ; longest allowed registered value\n *                    ;   longer than primary+extlang\n *                    ;   which requires 7 characters\n * script        =  5 ; if not suppressed: see Section 4.1\n * region        =  4 ; UN M.49 numeric region code\n *                    ;   ISO 3166-1 codes require 3\n * variant1      =  9 ; needs 'language' as a prefix\n * variant2      =  9 ; very rare, as it needs\n *                    ;   'language-variant1' as a prefix\n *\n * total         = 35 characters\n * ```\n * */\nexport const LANGUAGE_CODE = 35;\n\n/**\n * Mailbox = Local-part \"@\" ( Domain / address-literal )\n * - Local-part:  The maximum total length of a user name or other local-part is 64 octets.\n * - Domain: The maximum total length of a domain name or number is 255 octets.\n * - Maximum length of an email address: 64 + 1 + 255 = 320\n * - Reference: [Simple Mail Transfer Protocol - Size Limits and Minimums](https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.3.1)\n * */\nexport const EMAIL_LOCAL_PART = 64;\nexport const EMAIL_DOMAIN = 255;\nexport const EMAIL = EMAIL_LOCAL_PART + 1 + EMAIL_DOMAIN; // 320\n\n/**\n * Reference: [E.164](https://en.wikipedia.org/wiki/E.164)\n * */\nexport const PHONE_NUMBER = 15;\n\n/**\n * Reference: [How big can a user agent string get?](https://stackoverflow.com/questions/654921/how-big-can-a-user-agent-string-get)\n * */\n// export const USER_AGENT = 250;\n"],"mappings":";AAMO,IAAM,OAAO;AAOb,IAAM,OAAO;AAOb,IAAM,OAAO;AAOb,IAAM,OAAO;AAOb,IAAM,aAAa;AAOnB,IAAM,YAAY,KAAK,IAAI,MAAM,MAAM,UAAU;AAOjD,IAAM,OAAO;AAOb,IAAM,iBAAiB,KAAK,IAAI,MAAM,MAAM,IAAI;AAMhD,IAAM,OAAO;AACb,IAAM,OAAO;AACb,IAAM,mBAAmB;AACzB,IAAM,KAAK,KAAK,IAAI,MAAM,MAAM,gBAAgB;AAQhD,IAAM,mBAAmB,mCAAmC;AAC5D,IAAM,WAAW,KAAK,IAAI,IAAI,gBAAgB;AAK9C,IAAM,uBAAuB;AAC7B,IAAM,uBAAuB;AAC7B,IAAM,eAAe,KAAK,IAAI,sBAAsB,oBAAoB;AAmBxE,IAAM,gBAAgB;AAStB,IAAM,mBAAmB;AACzB,IAAM,eAAe;AACrB,IAAM,QAAQ,mBAAmB,IAAI;AAKrC,IAAM,eAAe;","names":[]}