/*!
 * \file unicode_script.hpp
 * \brief Unicode Script ranges for `\p{sc=...}` (UCD contract, parsed from tools/ucd/Scripts.txt).
 *
 * GENERATED by tools/gen_unicode_script_tables.py -- DO NOT EDIT BY HAND.
 *
 * Every assigned code point has exactly one Script, so this is one sorted `{lo, hi, script}` table
 * partitioning the code space (gaps are `Unknown`). Parsed from the committed Scripts.txt and, at
 * generation, cross-checked against the `regex` module. Scripts data version: 16.0.0 (asserted).
 * INERT: no parser reaches these yet (the P0b data slice).
 */
#ifndef REAL_UNICODE_SCRIPT_HPP
#define REAL_UNICODE_SCRIPT_HPP

// Internal — do not include directly.
// Users: #include <real/real.hpp> (or the documented opt-ins <real/dfa.hpp>, <real/std/regex.hpp>).

#include "real/version.hpp"

#include <cstddef>
#include <cstdint>
#include <string_view>

namespace real::detail {

  //! \brief The Unicode data version these tables were generated from (16.0.0).
  inline constexpr const char* unicode_script_unidata_version {"16.0.0"};

  //! \brief A Unicode Script value; `Unknown` (0) is every code point no script assigns.
  enum class script : std::uint8_t {
    Unknown,
    Adlam,
    Ahom,
    Anatolian_Hieroglyphs,
    Arabic,
    Armenian,
    Avestan,
    Balinese,
    Bamum,
    Bassa_Vah,
    Batak,
    Bengali,
    Bhaiksuki,
    Bopomofo,
    Brahmi,
    Braille,
    Buginese,
    Buhid,
    Canadian_Aboriginal,
    Carian,
    Caucasian_Albanian,
    Chakma,
    Cham,
    Cherokee,
    Chorasmian,
    Common,
    Coptic,
    Cuneiform,
    Cypriot,
    Cypro_Minoan,
    Cyrillic,
    Deseret,
    Devanagari,
    Dives_Akuru,
    Dogra,
    Duployan,
    Egyptian_Hieroglyphs,
    Elbasan,
    Elymaic,
    Ethiopic,
    Garay,
    Georgian,
    Glagolitic,
    Gothic,
    Grantha,
    Greek,
    Gujarati,
    Gunjala_Gondi,
    Gurmukhi,
    Gurung_Khema,
    Han,
    Hangul,
    Hanifi_Rohingya,
    Hanunoo,
    Hatran,
    Hebrew,
    Hiragana,
    Imperial_Aramaic,
    Inherited,
    Inscriptional_Pahlavi,
    Inscriptional_Parthian,
    Javanese,
    Kaithi,
    Kannada,
    Katakana,
    Kawi,
    Kayah_Li,
    Kharoshthi,
    Khitan_Small_Script,
    Khmer,
    Khojki,
    Khudawadi,
    Kirat_Rai,
    Lao,
    Latin,
    Lepcha,
    Limbu,
    Linear_A,
    Linear_B,
    Lisu,
    Lycian,
    Lydian,
    Mahajani,
    Makasar,
    Malayalam,
    Mandaic,
    Manichaean,
    Marchen,
    Masaram_Gondi,
    Medefaidrin,
    Meetei_Mayek,
    Mende_Kikakui,
    Meroitic_Cursive,
    Meroitic_Hieroglyphs,
    Miao,
    Modi,
    Mongolian,
    Mro,
    Multani,
    Myanmar,
    Nabataean,
    Nag_Mundari,
    Nandinagari,
    New_Tai_Lue,
    Newa,
    Nko,
    Nushu,
    Nyiakeng_Puachue_Hmong,
    Ogham,
    Ol_Chiki,
    Ol_Onal,
    Old_Hungarian,
    Old_Italic,
    Old_North_Arabian,
    Old_Permic,
    Old_Persian,
    Old_Sogdian,
    Old_South_Arabian,
    Old_Turkic,
    Old_Uyghur,
    Oriya,
    Osage,
    Osmanya,
    Pahawh_Hmong,
    Palmyrene,
    Pau_Cin_Hau,
    Phags_Pa,
    Phoenician,
    Psalter_Pahlavi,
    Rejang,
    Runic,
    Samaritan,
    Saurashtra,
    Sharada,
    Shavian,
    Siddham,
    SignWriting,
    Sinhala,
    Sogdian,
    Sora_Sompeng,
    Soyombo,
    Sundanese,
    Sunuwar,
    Syloti_Nagri,
    Syriac,
    Tagalog,
    Tagbanwa,
    Tai_Le,
    Tai_Tham,
    Tai_Viet,
    Takri,
    Tamil,
    Tangsa,
    Tangut,
    Telugu,
    Thaana,
    Thai,
    Tibetan,
    Tifinagh,
    Tirhuta,
    Todhri,
    Toto,
    Tulu_Tigalari,
    Ugaritic,
    Vai,
    Vithkuqi,
    Wancho,
    Warang_Citi,
    Yezidi,
    Yi,
    Zanabazar_Square,
    count
  };

  //! \brief One code-point range and the Script it belongs to (the table partitions the code space).
  struct script_range { char32_t lo; char32_t hi; script sc; };

  //! \brief Script partition — 979 ranges, sorted and disjoint.
  inline constexpr script_range script_ranges[] {
    {0x0000, 0x0040, script::Common},
    {0x0041, 0x005A, script::Latin},
    {0x005B, 0x0060, script::Common},
    {0x0061, 0x007A, script::Latin},
    {0x007B, 0x00A9, script::Common},
    {0x00AA, 0x00AA, script::Latin},
    {0x00AB, 0x00B9, script::Common},
    {0x00BA, 0x00BA, script::Latin},
    {0x00BB, 0x00BF, script::Common},
    {0x00C0, 0x00D6, script::Latin},
    {0x00D7, 0x00D7, script::Common},
    {0x00D8, 0x00F6, script::Latin},
    {0x00F7, 0x00F7, script::Common},
    {0x00F8, 0x02B8, script::Latin},
    {0x02B9, 0x02DF, script::Common},
    {0x02E0, 0x02E4, script::Latin},
    {0x02E5, 0x02E9, script::Common},
    {0x02EA, 0x02EB, script::Bopomofo},
    {0x02EC, 0x02FF, script::Common},
    {0x0300, 0x036F, script::Inherited},
    {0x0370, 0x0373, script::Greek},
    {0x0374, 0x0374, script::Common},
    {0x0375, 0x0377, script::Greek},
    {0x037A, 0x037D, script::Greek},
    {0x037E, 0x037E, script::Common},
    {0x037F, 0x037F, script::Greek},
    {0x0384, 0x0384, script::Greek},
    {0x0385, 0x0385, script::Common},
    {0x0386, 0x0386, script::Greek},
    {0x0387, 0x0387, script::Common},
    {0x0388, 0x038A, script::Greek},
    {0x038C, 0x038C, script::Greek},
    {0x038E, 0x03A1, script::Greek},
    {0x03A3, 0x03E1, script::Greek},
    {0x03E2, 0x03EF, script::Coptic},
    {0x03F0, 0x03FF, script::Greek},
    {0x0400, 0x0484, script::Cyrillic},
    {0x0485, 0x0486, script::Inherited},
    {0x0487, 0x052F, script::Cyrillic},
    {0x0531, 0x0556, script::Armenian},
    {0x0559, 0x058A, script::Armenian},
    {0x058D, 0x058F, script::Armenian},
    {0x0591, 0x05C7, script::Hebrew},
    {0x05D0, 0x05EA, script::Hebrew},
    {0x05EF, 0x05F4, script::Hebrew},
    {0x0600, 0x0604, script::Arabic},
    {0x0605, 0x0605, script::Common},
    {0x0606, 0x060B, script::Arabic},
    {0x060C, 0x060C, script::Common},
    {0x060D, 0x061A, script::Arabic},
    {0x061B, 0x061B, script::Common},
    {0x061C, 0x061E, script::Arabic},
    {0x061F, 0x061F, script::Common},
    {0x0620, 0x063F, script::Arabic},
    {0x0640, 0x0640, script::Common},
    {0x0641, 0x064A, script::Arabic},
    {0x064B, 0x0655, script::Inherited},
    {0x0656, 0x066F, script::Arabic},
    {0x0670, 0x0670, script::Inherited},
    {0x0671, 0x06DC, script::Arabic},
    {0x06DD, 0x06DD, script::Common},
    {0x06DE, 0x06FF, script::Arabic},
    {0x0700, 0x070D, script::Syriac},
    {0x070F, 0x074A, script::Syriac},
    {0x074D, 0x074F, script::Syriac},
    {0x0750, 0x077F, script::Arabic},
    {0x0780, 0x07B1, script::Thaana},
    {0x07C0, 0x07FA, script::Nko},
    {0x07FD, 0x07FF, script::Nko},
    {0x0800, 0x082D, script::Samaritan},
    {0x0830, 0x083E, script::Samaritan},
    {0x0840, 0x085B, script::Mandaic},
    {0x085E, 0x085E, script::Mandaic},
    {0x0860, 0x086A, script::Syriac},
    {0x0870, 0x088E, script::Arabic},
    {0x0890, 0x0891, script::Arabic},
    {0x0897, 0x08E1, script::Arabic},
    {0x08E2, 0x08E2, script::Common},
    {0x08E3, 0x08FF, script::Arabic},
    {0x0900, 0x0950, script::Devanagari},
    {0x0951, 0x0954, script::Inherited},
    {0x0955, 0x0963, script::Devanagari},
    {0x0964, 0x0965, script::Common},
    {0x0966, 0x097F, script::Devanagari},
    {0x0980, 0x0983, script::Bengali},
    {0x0985, 0x098C, script::Bengali},
    {0x098F, 0x0990, script::Bengali},
    {0x0993, 0x09A8, script::Bengali},
    {0x09AA, 0x09B0, script::Bengali},
    {0x09B2, 0x09B2, script::Bengali},
    {0x09B6, 0x09B9, script::Bengali},
    {0x09BC, 0x09C4, script::Bengali},
    {0x09C7, 0x09C8, script::Bengali},
    {0x09CB, 0x09CE, script::Bengali},
    {0x09D7, 0x09D7, script::Bengali},
    {0x09DC, 0x09DD, script::Bengali},
    {0x09DF, 0x09E3, script::Bengali},
    {0x09E6, 0x09FE, script::Bengali},
    {0x0A01, 0x0A03, script::Gurmukhi},
    {0x0A05, 0x0A0A, script::Gurmukhi},
    {0x0A0F, 0x0A10, script::Gurmukhi},
    {0x0A13, 0x0A28, script::Gurmukhi},
    {0x0A2A, 0x0A30, script::Gurmukhi},
    {0x0A32, 0x0A33, script::Gurmukhi},
    {0x0A35, 0x0A36, script::Gurmukhi},
    {0x0A38, 0x0A39, script::Gurmukhi},
    {0x0A3C, 0x0A3C, script::Gurmukhi},
    {0x0A3E, 0x0A42, script::Gurmukhi},
    {0x0A47, 0x0A48, script::Gurmukhi},
    {0x0A4B, 0x0A4D, script::Gurmukhi},
    {0x0A51, 0x0A51, script::Gurmukhi},
    {0x0A59, 0x0A5C, script::Gurmukhi},
    {0x0A5E, 0x0A5E, script::Gurmukhi},
    {0x0A66, 0x0A76, script::Gurmukhi},
    {0x0A81, 0x0A83, script::Gujarati},
    {0x0A85, 0x0A8D, script::Gujarati},
    {0x0A8F, 0x0A91, script::Gujarati},
    {0x0A93, 0x0AA8, script::Gujarati},
    {0x0AAA, 0x0AB0, script::Gujarati},
    {0x0AB2, 0x0AB3, script::Gujarati},
    {0x0AB5, 0x0AB9, script::Gujarati},
    {0x0ABC, 0x0AC5, script::Gujarati},
    {0x0AC7, 0x0AC9, script::Gujarati},
    {0x0ACB, 0x0ACD, script::Gujarati},
    {0x0AD0, 0x0AD0, script::Gujarati},
    {0x0AE0, 0x0AE3, script::Gujarati},
    {0x0AE6, 0x0AF1, script::Gujarati},
    {0x0AF9, 0x0AFF, script::Gujarati},
    {0x0B01, 0x0B03, script::Oriya},
    {0x0B05, 0x0B0C, script::Oriya},
    {0x0B0F, 0x0B10, script::Oriya},
    {0x0B13, 0x0B28, script::Oriya},
    {0x0B2A, 0x0B30, script::Oriya},
    {0x0B32, 0x0B33, script::Oriya},
    {0x0B35, 0x0B39, script::Oriya},
    {0x0B3C, 0x0B44, script::Oriya},
    {0x0B47, 0x0B48, script::Oriya},
    {0x0B4B, 0x0B4D, script::Oriya},
    {0x0B55, 0x0B57, script::Oriya},
    {0x0B5C, 0x0B5D, script::Oriya},
    {0x0B5F, 0x0B63, script::Oriya},
    {0x0B66, 0x0B77, script::Oriya},
    {0x0B82, 0x0B83, script::Tamil},
    {0x0B85, 0x0B8A, script::Tamil},
    {0x0B8E, 0x0B90, script::Tamil},
    {0x0B92, 0x0B95, script::Tamil},
    {0x0B99, 0x0B9A, script::Tamil},
    {0x0B9C, 0x0B9C, script::Tamil},
    {0x0B9E, 0x0B9F, script::Tamil},
    {0x0BA3, 0x0BA4, script::Tamil},
    {0x0BA8, 0x0BAA, script::Tamil},
    {0x0BAE, 0x0BB9, script::Tamil},
    {0x0BBE, 0x0BC2, script::Tamil},
    {0x0BC6, 0x0BC8, script::Tamil},
    {0x0BCA, 0x0BCD, script::Tamil},
    {0x0BD0, 0x0BD0, script::Tamil},
    {0x0BD7, 0x0BD7, script::Tamil},
    {0x0BE6, 0x0BFA, script::Tamil},
    {0x0C00, 0x0C0C, script::Telugu},
    {0x0C0E, 0x0C10, script::Telugu},
    {0x0C12, 0x0C28, script::Telugu},
    {0x0C2A, 0x0C39, script::Telugu},
    {0x0C3C, 0x0C44, script::Telugu},
    {0x0C46, 0x0C48, script::Telugu},
    {0x0C4A, 0x0C4D, script::Telugu},
    {0x0C55, 0x0C56, script::Telugu},
    {0x0C58, 0x0C5A, script::Telugu},
    {0x0C5D, 0x0C5D, script::Telugu},
    {0x0C60, 0x0C63, script::Telugu},
    {0x0C66, 0x0C6F, script::Telugu},
    {0x0C77, 0x0C7F, script::Telugu},
    {0x0C80, 0x0C8C, script::Kannada},
    {0x0C8E, 0x0C90, script::Kannada},
    {0x0C92, 0x0CA8, script::Kannada},
    {0x0CAA, 0x0CB3, script::Kannada},
    {0x0CB5, 0x0CB9, script::Kannada},
    {0x0CBC, 0x0CC4, script::Kannada},
    {0x0CC6, 0x0CC8, script::Kannada},
    {0x0CCA, 0x0CCD, script::Kannada},
    {0x0CD5, 0x0CD6, script::Kannada},
    {0x0CDD, 0x0CDE, script::Kannada},
    {0x0CE0, 0x0CE3, script::Kannada},
    {0x0CE6, 0x0CEF, script::Kannada},
    {0x0CF1, 0x0CF3, script::Kannada},
    {0x0D00, 0x0D0C, script::Malayalam},
    {0x0D0E, 0x0D10, script::Malayalam},
    {0x0D12, 0x0D44, script::Malayalam},
    {0x0D46, 0x0D48, script::Malayalam},
    {0x0D4A, 0x0D4F, script::Malayalam},
    {0x0D54, 0x0D63, script::Malayalam},
    {0x0D66, 0x0D7F, script::Malayalam},
    {0x0D81, 0x0D83, script::Sinhala},
    {0x0D85, 0x0D96, script::Sinhala},
    {0x0D9A, 0x0DB1, script::Sinhala},
    {0x0DB3, 0x0DBB, script::Sinhala},
    {0x0DBD, 0x0DBD, script::Sinhala},
    {0x0DC0, 0x0DC6, script::Sinhala},
    {0x0DCA, 0x0DCA, script::Sinhala},
    {0x0DCF, 0x0DD4, script::Sinhala},
    {0x0DD6, 0x0DD6, script::Sinhala},
    {0x0DD8, 0x0DDF, script::Sinhala},
    {0x0DE6, 0x0DEF, script::Sinhala},
    {0x0DF2, 0x0DF4, script::Sinhala},
    {0x0E01, 0x0E3A, script::Thai},
    {0x0E3F, 0x0E3F, script::Common},
    {0x0E40, 0x0E5B, script::Thai},
    {0x0E81, 0x0E82, script::Lao},
    {0x0E84, 0x0E84, script::Lao},
    {0x0E86, 0x0E8A, script::Lao},
    {0x0E8C, 0x0EA3, script::Lao},
    {0x0EA5, 0x0EA5, script::Lao},
    {0x0EA7, 0x0EBD, script::Lao},
    {0x0EC0, 0x0EC4, script::Lao},
    {0x0EC6, 0x0EC6, script::Lao},
    {0x0EC8, 0x0ECE, script::Lao},
    {0x0ED0, 0x0ED9, script::Lao},
    {0x0EDC, 0x0EDF, script::Lao},
    {0x0F00, 0x0F47, script::Tibetan},
    {0x0F49, 0x0F6C, script::Tibetan},
    {0x0F71, 0x0F97, script::Tibetan},
    {0x0F99, 0x0FBC, script::Tibetan},
    {0x0FBE, 0x0FCC, script::Tibetan},
    {0x0FCE, 0x0FD4, script::Tibetan},
    {0x0FD5, 0x0FD8, script::Common},
    {0x0FD9, 0x0FDA, script::Tibetan},
    {0x1000, 0x109F, script::Myanmar},
    {0x10A0, 0x10C5, script::Georgian},
    {0x10C7, 0x10C7, script::Georgian},
    {0x10CD, 0x10CD, script::Georgian},
    {0x10D0, 0x10FA, script::Georgian},
    {0x10FB, 0x10FB, script::Common},
    {0x10FC, 0x10FF, script::Georgian},
    {0x1100, 0x11FF, script::Hangul},
    {0x1200, 0x1248, script::Ethiopic},
    {0x124A, 0x124D, script::Ethiopic},
    {0x1250, 0x1256, script::Ethiopic},
    {0x1258, 0x1258, script::Ethiopic},
    {0x125A, 0x125D, script::Ethiopic},
    {0x1260, 0x1288, script::Ethiopic},
    {0x128A, 0x128D, script::Ethiopic},
    {0x1290, 0x12B0, script::Ethiopic},
    {0x12B2, 0x12B5, script::Ethiopic},
    {0x12B8, 0x12BE, script::Ethiopic},
    {0x12C0, 0x12C0, script::Ethiopic},
    {0x12C2, 0x12C5, script::Ethiopic},
    {0x12C8, 0x12D6, script::Ethiopic},
    {0x12D8, 0x1310, script::Ethiopic},
    {0x1312, 0x1315, script::Ethiopic},
    {0x1318, 0x135A, script::Ethiopic},
    {0x135D, 0x137C, script::Ethiopic},
    {0x1380, 0x1399, script::Ethiopic},
    {0x13A0, 0x13F5, script::Cherokee},
    {0x13F8, 0x13FD, script::Cherokee},
    {0x1400, 0x167F, script::Canadian_Aboriginal},
    {0x1680, 0x169C, script::Ogham},
    {0x16A0, 0x16EA, script::Runic},
    {0x16EB, 0x16ED, script::Common},
    {0x16EE, 0x16F8, script::Runic},
    {0x1700, 0x1715, script::Tagalog},
    {0x171F, 0x171F, script::Tagalog},
    {0x1720, 0x1734, script::Hanunoo},
    {0x1735, 0x1736, script::Common},
    {0x1740, 0x1753, script::Buhid},
    {0x1760, 0x176C, script::Tagbanwa},
    {0x176E, 0x1770, script::Tagbanwa},
    {0x1772, 0x1773, script::Tagbanwa},
    {0x1780, 0x17DD, script::Khmer},
    {0x17E0, 0x17E9, script::Khmer},
    {0x17F0, 0x17F9, script::Khmer},
    {0x1800, 0x1801, script::Mongolian},
    {0x1802, 0x1803, script::Common},
    {0x1804, 0x1804, script::Mongolian},
    {0x1805, 0x1805, script::Common},
    {0x1806, 0x1819, script::Mongolian},
    {0x1820, 0x1878, script::Mongolian},
    {0x1880, 0x18AA, script::Mongolian},
    {0x18B0, 0x18F5, script::Canadian_Aboriginal},
    {0x1900, 0x191E, script::Limbu},
    {0x1920, 0x192B, script::Limbu},
    {0x1930, 0x193B, script::Limbu},
    {0x1940, 0x1940, script::Limbu},
    {0x1944, 0x194F, script::Limbu},
    {0x1950, 0x196D, script::Tai_Le},
    {0x1970, 0x1974, script::Tai_Le},
    {0x1980, 0x19AB, script::New_Tai_Lue},
    {0x19B0, 0x19C9, script::New_Tai_Lue},
    {0x19D0, 0x19DA, script::New_Tai_Lue},
    {0x19DE, 0x19DF, script::New_Tai_Lue},
    {0x19E0, 0x19FF, script::Khmer},
    {0x1A00, 0x1A1B, script::Buginese},
    {0x1A1E, 0x1A1F, script::Buginese},
    {0x1A20, 0x1A5E, script::Tai_Tham},
    {0x1A60, 0x1A7C, script::Tai_Tham},
    {0x1A7F, 0x1A89, script::Tai_Tham},
    {0x1A90, 0x1A99, script::Tai_Tham},
    {0x1AA0, 0x1AAD, script::Tai_Tham},
    {0x1AB0, 0x1ACE, script::Inherited},
    {0x1B00, 0x1B4C, script::Balinese},
    {0x1B4E, 0x1B7F, script::Balinese},
    {0x1B80, 0x1BBF, script::Sundanese},
    {0x1BC0, 0x1BF3, script::Batak},
    {0x1BFC, 0x1BFF, script::Batak},
    {0x1C00, 0x1C37, script::Lepcha},
    {0x1C3B, 0x1C49, script::Lepcha},
    {0x1C4D, 0x1C4F, script::Lepcha},
    {0x1C50, 0x1C7F, script::Ol_Chiki},
    {0x1C80, 0x1C8A, script::Cyrillic},
    {0x1C90, 0x1CBA, script::Georgian},
    {0x1CBD, 0x1CBF, script::Georgian},
    {0x1CC0, 0x1CC7, script::Sundanese},
    {0x1CD0, 0x1CD2, script::Inherited},
    {0x1CD3, 0x1CD3, script::Common},
    {0x1CD4, 0x1CE0, script::Inherited},
    {0x1CE1, 0x1CE1, script::Common},
    {0x1CE2, 0x1CE8, script::Inherited},
    {0x1CE9, 0x1CEC, script::Common},
    {0x1CED, 0x1CED, script::Inherited},
    {0x1CEE, 0x1CF3, script::Common},
    {0x1CF4, 0x1CF4, script::Inherited},
    {0x1CF5, 0x1CF7, script::Common},
    {0x1CF8, 0x1CF9, script::Inherited},
    {0x1CFA, 0x1CFA, script::Common},
    {0x1D00, 0x1D25, script::Latin},
    {0x1D26, 0x1D2A, script::Greek},
    {0x1D2B, 0x1D2B, script::Cyrillic},
    {0x1D2C, 0x1D5C, script::Latin},
    {0x1D5D, 0x1D61, script::Greek},
    {0x1D62, 0x1D65, script::Latin},
    {0x1D66, 0x1D6A, script::Greek},
    {0x1D6B, 0x1D77, script::Latin},
    {0x1D78, 0x1D78, script::Cyrillic},
    {0x1D79, 0x1DBE, script::Latin},
    {0x1DBF, 0x1DBF, script::Greek},
    {0x1DC0, 0x1DFF, script::Inherited},
    {0x1E00, 0x1EFF, script::Latin},
    {0x1F00, 0x1F15, script::Greek},
    {0x1F18, 0x1F1D, script::Greek},
    {0x1F20, 0x1F45, script::Greek},
    {0x1F48, 0x1F4D, script::Greek},
    {0x1F50, 0x1F57, script::Greek},
    {0x1F59, 0x1F59, script::Greek},
    {0x1F5B, 0x1F5B, script::Greek},
    {0x1F5D, 0x1F5D, script::Greek},
    {0x1F5F, 0x1F7D, script::Greek},
    {0x1F80, 0x1FB4, script::Greek},
    {0x1FB6, 0x1FC4, script::Greek},
    {0x1FC6, 0x1FD3, script::Greek},
    {0x1FD6, 0x1FDB, script::Greek},
    {0x1FDD, 0x1FEF, script::Greek},
    {0x1FF2, 0x1FF4, script::Greek},
    {0x1FF6, 0x1FFE, script::Greek},
    {0x2000, 0x200B, script::Common},
    {0x200C, 0x200D, script::Inherited},
    {0x200E, 0x2064, script::Common},
    {0x2066, 0x2070, script::Common},
    {0x2071, 0x2071, script::Latin},
    {0x2074, 0x207E, script::Common},
    {0x207F, 0x207F, script::Latin},
    {0x2080, 0x208E, script::Common},
    {0x2090, 0x209C, script::Latin},
    {0x20A0, 0x20C0, script::Common},
    {0x20D0, 0x20F0, script::Inherited},
    {0x2100, 0x2125, script::Common},
    {0x2126, 0x2126, script::Greek},
    {0x2127, 0x2129, script::Common},
    {0x212A, 0x212B, script::Latin},
    {0x212C, 0x2131, script::Common},
    {0x2132, 0x2132, script::Latin},
    {0x2133, 0x214D, script::Common},
    {0x214E, 0x214E, script::Latin},
    {0x214F, 0x215F, script::Common},
    {0x2160, 0x2188, script::Latin},
    {0x2189, 0x218B, script::Common},
    {0x2190, 0x2429, script::Common},
    {0x2440, 0x244A, script::Common},
    {0x2460, 0x27FF, script::Common},
    {0x2800, 0x28FF, script::Braille},
    {0x2900, 0x2B73, script::Common},
    {0x2B76, 0x2B95, script::Common},
    {0x2B97, 0x2BFF, script::Common},
    {0x2C00, 0x2C5F, script::Glagolitic},
    {0x2C60, 0x2C7F, script::Latin},
    {0x2C80, 0x2CF3, script::Coptic},
    {0x2CF9, 0x2CFF, script::Coptic},
    {0x2D00, 0x2D25, script::Georgian},
    {0x2D27, 0x2D27, script::Georgian},
    {0x2D2D, 0x2D2D, script::Georgian},
    {0x2D30, 0x2D67, script::Tifinagh},
    {0x2D6F, 0x2D70, script::Tifinagh},
    {0x2D7F, 0x2D7F, script::Tifinagh},
    {0x2D80, 0x2D96, script::Ethiopic},
    {0x2DA0, 0x2DA6, script::Ethiopic},
    {0x2DA8, 0x2DAE, script::Ethiopic},
    {0x2DB0, 0x2DB6, script::Ethiopic},
    {0x2DB8, 0x2DBE, script::Ethiopic},
    {0x2DC0, 0x2DC6, script::Ethiopic},
    {0x2DC8, 0x2DCE, script::Ethiopic},
    {0x2DD0, 0x2DD6, script::Ethiopic},
    {0x2DD8, 0x2DDE, script::Ethiopic},
    {0x2DE0, 0x2DFF, script::Cyrillic},
    {0x2E00, 0x2E5D, script::Common},
    {0x2E80, 0x2E99, script::Han},
    {0x2E9B, 0x2EF3, script::Han},
    {0x2F00, 0x2FD5, script::Han},
    {0x2FF0, 0x3004, script::Common},
    {0x3005, 0x3005, script::Han},
    {0x3006, 0x3006, script::Common},
    {0x3007, 0x3007, script::Han},
    {0x3008, 0x3020, script::Common},
    {0x3021, 0x3029, script::Han},
    {0x302A, 0x302D, script::Inherited},
    {0x302E, 0x302F, script::Hangul},
    {0x3030, 0x3037, script::Common},
    {0x3038, 0x303B, script::Han},
    {0x303C, 0x303F, script::Common},
    {0x3041, 0x3096, script::Hiragana},
    {0x3099, 0x309A, script::Inherited},
    {0x309B, 0x309C, script::Common},
    {0x309D, 0x309F, script::Hiragana},
    {0x30A0, 0x30A0, script::Common},
    {0x30A1, 0x30FA, script::Katakana},
    {0x30FB, 0x30FC, script::Common},
    {0x30FD, 0x30FF, script::Katakana},
    {0x3105, 0x312F, script::Bopomofo},
    {0x3131, 0x318E, script::Hangul},
    {0x3190, 0x319F, script::Common},
    {0x31A0, 0x31BF, script::Bopomofo},
    {0x31C0, 0x31E5, script::Common},
    {0x31EF, 0x31EF, script::Common},
    {0x31F0, 0x31FF, script::Katakana},
    {0x3200, 0x321E, script::Hangul},
    {0x3220, 0x325F, script::Common},
    {0x3260, 0x327E, script::Hangul},
    {0x327F, 0x32CF, script::Common},
    {0x32D0, 0x32FE, script::Katakana},
    {0x32FF, 0x32FF, script::Common},
    {0x3300, 0x3357, script::Katakana},
    {0x3358, 0x33FF, script::Common},
    {0x3400, 0x4DBF, script::Han},
    {0x4DC0, 0x4DFF, script::Common},
    {0x4E00, 0x9FFF, script::Han},
    {0xA000, 0xA48C, script::Yi},
    {0xA490, 0xA4C6, script::Yi},
    {0xA4D0, 0xA4FF, script::Lisu},
    {0xA500, 0xA62B, script::Vai},
    {0xA640, 0xA69F, script::Cyrillic},
    {0xA6A0, 0xA6F7, script::Bamum},
    {0xA700, 0xA721, script::Common},
    {0xA722, 0xA787, script::Latin},
    {0xA788, 0xA78A, script::Common},
    {0xA78B, 0xA7CD, script::Latin},
    {0xA7D0, 0xA7D1, script::Latin},
    {0xA7D3, 0xA7D3, script::Latin},
    {0xA7D5, 0xA7DC, script::Latin},
    {0xA7F2, 0xA7FF, script::Latin},
    {0xA800, 0xA82C, script::Syloti_Nagri},
    {0xA830, 0xA839, script::Common},
    {0xA840, 0xA877, script::Phags_Pa},
    {0xA880, 0xA8C5, script::Saurashtra},
    {0xA8CE, 0xA8D9, script::Saurashtra},
    {0xA8E0, 0xA8FF, script::Devanagari},
    {0xA900, 0xA92D, script::Kayah_Li},
    {0xA92E, 0xA92E, script::Common},
    {0xA92F, 0xA92F, script::Kayah_Li},
    {0xA930, 0xA953, script::Rejang},
    {0xA95F, 0xA95F, script::Rejang},
    {0xA960, 0xA97C, script::Hangul},
    {0xA980, 0xA9CD, script::Javanese},
    {0xA9CF, 0xA9CF, script::Common},
    {0xA9D0, 0xA9D9, script::Javanese},
    {0xA9DE, 0xA9DF, script::Javanese},
    {0xA9E0, 0xA9FE, script::Myanmar},
    {0xAA00, 0xAA36, script::Cham},
    {0xAA40, 0xAA4D, script::Cham},
    {0xAA50, 0xAA59, script::Cham},
    {0xAA5C, 0xAA5F, script::Cham},
    {0xAA60, 0xAA7F, script::Myanmar},
    {0xAA80, 0xAAC2, script::Tai_Viet},
    {0xAADB, 0xAADF, script::Tai_Viet},
    {0xAAE0, 0xAAF6, script::Meetei_Mayek},
    {0xAB01, 0xAB06, script::Ethiopic},
    {0xAB09, 0xAB0E, script::Ethiopic},
    {0xAB11, 0xAB16, script::Ethiopic},
    {0xAB20, 0xAB26, script::Ethiopic},
    {0xAB28, 0xAB2E, script::Ethiopic},
    {0xAB30, 0xAB5A, script::Latin},
    {0xAB5B, 0xAB5B, script::Common},
    {0xAB5C, 0xAB64, script::Latin},
    {0xAB65, 0xAB65, script::Greek},
    {0xAB66, 0xAB69, script::Latin},
    {0xAB6A, 0xAB6B, script::Common},
    {0xAB70, 0xABBF, script::Cherokee},
    {0xABC0, 0xABED, script::Meetei_Mayek},
    {0xABF0, 0xABF9, script::Meetei_Mayek},
    {0xAC00, 0xD7A3, script::Hangul},
    {0xD7B0, 0xD7C6, script::Hangul},
    {0xD7CB, 0xD7FB, script::Hangul},
    {0xF900, 0xFA6D, script::Han},
    {0xFA70, 0xFAD9, script::Han},
    {0xFB00, 0xFB06, script::Latin},
    {0xFB13, 0xFB17, script::Armenian},
    {0xFB1D, 0xFB36, script::Hebrew},
    {0xFB38, 0xFB3C, script::Hebrew},
    {0xFB3E, 0xFB3E, script::Hebrew},
    {0xFB40, 0xFB41, script::Hebrew},
    {0xFB43, 0xFB44, script::Hebrew},
    {0xFB46, 0xFB4F, script::Hebrew},
    {0xFB50, 0xFBC2, script::Arabic},
    {0xFBD3, 0xFD3D, script::Arabic},
    {0xFD3E, 0xFD3F, script::Common},
    {0xFD40, 0xFD8F, script::Arabic},
    {0xFD92, 0xFDC7, script::Arabic},
    {0xFDCF, 0xFDCF, script::Arabic},
    {0xFDF0, 0xFDFF, script::Arabic},
    {0xFE00, 0xFE0F, script::Inherited},
    {0xFE10, 0xFE19, script::Common},
    {0xFE20, 0xFE2D, script::Inherited},
    {0xFE2E, 0xFE2F, script::Cyrillic},
    {0xFE30, 0xFE52, script::Common},
    {0xFE54, 0xFE66, script::Common},
    {0xFE68, 0xFE6B, script::Common},
    {0xFE70, 0xFE74, script::Arabic},
    {0xFE76, 0xFEFC, script::Arabic},
    {0xFEFF, 0xFEFF, script::Common},
    {0xFF01, 0xFF20, script::Common},
    {0xFF21, 0xFF3A, script::Latin},
    {0xFF3B, 0xFF40, script::Common},
    {0xFF41, 0xFF5A, script::Latin},
    {0xFF5B, 0xFF65, script::Common},
    {0xFF66, 0xFF6F, script::Katakana},
    {0xFF70, 0xFF70, script::Common},
    {0xFF71, 0xFF9D, script::Katakana},
    {0xFF9E, 0xFF9F, script::Common},
    {0xFFA0, 0xFFBE, script::Hangul},
    {0xFFC2, 0xFFC7, script::Hangul},
    {0xFFCA, 0xFFCF, script::Hangul},
    {0xFFD2, 0xFFD7, script::Hangul},
    {0xFFDA, 0xFFDC, script::Hangul},
    {0xFFE0, 0xFFE6, script::Common},
    {0xFFE8, 0xFFEE, script::Common},
    {0xFFF9, 0xFFFD, script::Common},
    {0x10000, 0x1000B, script::Linear_B},
    {0x1000D, 0x10026, script::Linear_B},
    {0x10028, 0x1003A, script::Linear_B},
    {0x1003C, 0x1003D, script::Linear_B},
    {0x1003F, 0x1004D, script::Linear_B},
    {0x10050, 0x1005D, script::Linear_B},
    {0x10080, 0x100FA, script::Linear_B},
    {0x10100, 0x10102, script::Common},
    {0x10107, 0x10133, script::Common},
    {0x10137, 0x1013F, script::Common},
    {0x10140, 0x1018E, script::Greek},
    {0x10190, 0x1019C, script::Common},
    {0x101A0, 0x101A0, script::Greek},
    {0x101D0, 0x101FC, script::Common},
    {0x101FD, 0x101FD, script::Inherited},
    {0x10280, 0x1029C, script::Lycian},
    {0x102A0, 0x102D0, script::Carian},
    {0x102E0, 0x102E0, script::Inherited},
    {0x102E1, 0x102FB, script::Common},
    {0x10300, 0x10323, script::Old_Italic},
    {0x1032D, 0x1032F, script::Old_Italic},
    {0x10330, 0x1034A, script::Gothic},
    {0x10350, 0x1037A, script::Old_Permic},
    {0x10380, 0x1039D, script::Ugaritic},
    {0x1039F, 0x1039F, script::Ugaritic},
    {0x103A0, 0x103C3, script::Old_Persian},
    {0x103C8, 0x103D5, script::Old_Persian},
    {0x10400, 0x1044F, script::Deseret},
    {0x10450, 0x1047F, script::Shavian},
    {0x10480, 0x1049D, script::Osmanya},
    {0x104A0, 0x104A9, script::Osmanya},
    {0x104B0, 0x104D3, script::Osage},
    {0x104D8, 0x104FB, script::Osage},
    {0x10500, 0x10527, script::Elbasan},
    {0x10530, 0x10563, script::Caucasian_Albanian},
    {0x1056F, 0x1056F, script::Caucasian_Albanian},
    {0x10570, 0x1057A, script::Vithkuqi},
    {0x1057C, 0x1058A, script::Vithkuqi},
    {0x1058C, 0x10592, script::Vithkuqi},
    {0x10594, 0x10595, script::Vithkuqi},
    {0x10597, 0x105A1, script::Vithkuqi},
    {0x105A3, 0x105B1, script::Vithkuqi},
    {0x105B3, 0x105B9, script::Vithkuqi},
    {0x105BB, 0x105BC, script::Vithkuqi},
    {0x105C0, 0x105F3, script::Todhri},
    {0x10600, 0x10736, script::Linear_A},
    {0x10740, 0x10755, script::Linear_A},
    {0x10760, 0x10767, script::Linear_A},
    {0x10780, 0x10785, script::Latin},
    {0x10787, 0x107B0, script::Latin},
    {0x107B2, 0x107BA, script::Latin},
    {0x10800, 0x10805, script::Cypriot},
    {0x10808, 0x10808, script::Cypriot},
    {0x1080A, 0x10835, script::Cypriot},
    {0x10837, 0x10838, script::Cypriot},
    {0x1083C, 0x1083C, script::Cypriot},
    {0x1083F, 0x1083F, script::Cypriot},
    {0x10840, 0x10855, script::Imperial_Aramaic},
    {0x10857, 0x1085F, script::Imperial_Aramaic},
    {0x10860, 0x1087F, script::Palmyrene},
    {0x10880, 0x1089E, script::Nabataean},
    {0x108A7, 0x108AF, script::Nabataean},
    {0x108E0, 0x108F2, script::Hatran},
    {0x108F4, 0x108F5, script::Hatran},
    {0x108FB, 0x108FF, script::Hatran},
    {0x10900, 0x1091B, script::Phoenician},
    {0x1091F, 0x1091F, script::Phoenician},
    {0x10920, 0x10939, script::Lydian},
    {0x1093F, 0x1093F, script::Lydian},
    {0x10980, 0x1099F, script::Meroitic_Hieroglyphs},
    {0x109A0, 0x109B7, script::Meroitic_Cursive},
    {0x109BC, 0x109CF, script::Meroitic_Cursive},
    {0x109D2, 0x109FF, script::Meroitic_Cursive},
    {0x10A00, 0x10A03, script::Kharoshthi},
    {0x10A05, 0x10A06, script::Kharoshthi},
    {0x10A0C, 0x10A13, script::Kharoshthi},
    {0x10A15, 0x10A17, script::Kharoshthi},
    {0x10A19, 0x10A35, script::Kharoshthi},
    {0x10A38, 0x10A3A, script::Kharoshthi},
    {0x10A3F, 0x10A48, script::Kharoshthi},
    {0x10A50, 0x10A58, script::Kharoshthi},
    {0x10A60, 0x10A7F, script::Old_South_Arabian},
    {0x10A80, 0x10A9F, script::Old_North_Arabian},
    {0x10AC0, 0x10AE6, script::Manichaean},
    {0x10AEB, 0x10AF6, script::Manichaean},
    {0x10B00, 0x10B35, script::Avestan},
    {0x10B39, 0x10B3F, script::Avestan},
    {0x10B40, 0x10B55, script::Inscriptional_Parthian},
    {0x10B58, 0x10B5F, script::Inscriptional_Parthian},
    {0x10B60, 0x10B72, script::Inscriptional_Pahlavi},
    {0x10B78, 0x10B7F, script::Inscriptional_Pahlavi},
    {0x10B80, 0x10B91, script::Psalter_Pahlavi},
    {0x10B99, 0x10B9C, script::Psalter_Pahlavi},
    {0x10BA9, 0x10BAF, script::Psalter_Pahlavi},
    {0x10C00, 0x10C48, script::Old_Turkic},
    {0x10C80, 0x10CB2, script::Old_Hungarian},
    {0x10CC0, 0x10CF2, script::Old_Hungarian},
    {0x10CFA, 0x10CFF, script::Old_Hungarian},
    {0x10D00, 0x10D27, script::Hanifi_Rohingya},
    {0x10D30, 0x10D39, script::Hanifi_Rohingya},
    {0x10D40, 0x10D65, script::Garay},
    {0x10D69, 0x10D85, script::Garay},
    {0x10D8E, 0x10D8F, script::Garay},
    {0x10E60, 0x10E7E, script::Arabic},
    {0x10E80, 0x10EA9, script::Yezidi},
    {0x10EAB, 0x10EAD, script::Yezidi},
    {0x10EB0, 0x10EB1, script::Yezidi},
    {0x10EC2, 0x10EC4, script::Arabic},
    {0x10EFC, 0x10EFF, script::Arabic},
    {0x10F00, 0x10F27, script::Old_Sogdian},
    {0x10F30, 0x10F59, script::Sogdian},
    {0x10F70, 0x10F89, script::Old_Uyghur},
    {0x10FB0, 0x10FCB, script::Chorasmian},
    {0x10FE0, 0x10FF6, script::Elymaic},
    {0x11000, 0x1104D, script::Brahmi},
    {0x11052, 0x11075, script::Brahmi},
    {0x1107F, 0x1107F, script::Brahmi},
    {0x11080, 0x110C2, script::Kaithi},
    {0x110CD, 0x110CD, script::Kaithi},
    {0x110D0, 0x110E8, script::Sora_Sompeng},
    {0x110F0, 0x110F9, script::Sora_Sompeng},
    {0x11100, 0x11134, script::Chakma},
    {0x11136, 0x11147, script::Chakma},
    {0x11150, 0x11176, script::Mahajani},
    {0x11180, 0x111DF, script::Sharada},
    {0x111E1, 0x111F4, script::Sinhala},
    {0x11200, 0x11211, script::Khojki},
    {0x11213, 0x11241, script::Khojki},
    {0x11280, 0x11286, script::Multani},
    {0x11288, 0x11288, script::Multani},
    {0x1128A, 0x1128D, script::Multani},
    {0x1128F, 0x1129D, script::Multani},
    {0x1129F, 0x112A9, script::Multani},
    {0x112B0, 0x112EA, script::Khudawadi},
    {0x112F0, 0x112F9, script::Khudawadi},
    {0x11300, 0x11303, script::Grantha},
    {0x11305, 0x1130C, script::Grantha},
    {0x1130F, 0x11310, script::Grantha},
    {0x11313, 0x11328, script::Grantha},
    {0x1132A, 0x11330, script::Grantha},
    {0x11332, 0x11333, script::Grantha},
    {0x11335, 0x11339, script::Grantha},
    {0x1133B, 0x1133B, script::Inherited},
    {0x1133C, 0x11344, script::Grantha},
    {0x11347, 0x11348, script::Grantha},
    {0x1134B, 0x1134D, script::Grantha},
    {0x11350, 0x11350, script::Grantha},
    {0x11357, 0x11357, script::Grantha},
    {0x1135D, 0x11363, script::Grantha},
    {0x11366, 0x1136C, script::Grantha},
    {0x11370, 0x11374, script::Grantha},
    {0x11380, 0x11389, script::Tulu_Tigalari},
    {0x1138B, 0x1138B, script::Tulu_Tigalari},
    {0x1138E, 0x1138E, script::Tulu_Tigalari},
    {0x11390, 0x113B5, script::Tulu_Tigalari},
    {0x113B7, 0x113C0, script::Tulu_Tigalari},
    {0x113C2, 0x113C2, script::Tulu_Tigalari},
    {0x113C5, 0x113C5, script::Tulu_Tigalari},
    {0x113C7, 0x113CA, script::Tulu_Tigalari},
    {0x113CC, 0x113D5, script::Tulu_Tigalari},
    {0x113D7, 0x113D8, script::Tulu_Tigalari},
    {0x113E1, 0x113E2, script::Tulu_Tigalari},
    {0x11400, 0x1145B, script::Newa},
    {0x1145D, 0x11461, script::Newa},
    {0x11480, 0x114C7, script::Tirhuta},
    {0x114D0, 0x114D9, script::Tirhuta},
    {0x11580, 0x115B5, script::Siddham},
    {0x115B8, 0x115DD, script::Siddham},
    {0x11600, 0x11644, script::Modi},
    {0x11650, 0x11659, script::Modi},
    {0x11660, 0x1166C, script::Mongolian},
    {0x11680, 0x116B9, script::Takri},
    {0x116C0, 0x116C9, script::Takri},
    {0x116D0, 0x116E3, script::Myanmar},
    {0x11700, 0x1171A, script::Ahom},
    {0x1171D, 0x1172B, script::Ahom},
    {0x11730, 0x11746, script::Ahom},
    {0x11800, 0x1183B, script::Dogra},
    {0x118A0, 0x118F2, script::Warang_Citi},
    {0x118FF, 0x118FF, script::Warang_Citi},
    {0x11900, 0x11906, script::Dives_Akuru},
    {0x11909, 0x11909, script::Dives_Akuru},
    {0x1190C, 0x11913, script::Dives_Akuru},
    {0x11915, 0x11916, script::Dives_Akuru},
    {0x11918, 0x11935, script::Dives_Akuru},
    {0x11937, 0x11938, script::Dives_Akuru},
    {0x1193B, 0x11946, script::Dives_Akuru},
    {0x11950, 0x11959, script::Dives_Akuru},
    {0x119A0, 0x119A7, script::Nandinagari},
    {0x119AA, 0x119D7, script::Nandinagari},
    {0x119DA, 0x119E4, script::Nandinagari},
    {0x11A00, 0x11A47, script::Zanabazar_Square},
    {0x11A50, 0x11AA2, script::Soyombo},
    {0x11AB0, 0x11ABF, script::Canadian_Aboriginal},
    {0x11AC0, 0x11AF8, script::Pau_Cin_Hau},
    {0x11B00, 0x11B09, script::Devanagari},
    {0x11BC0, 0x11BE1, script::Sunuwar},
    {0x11BF0, 0x11BF9, script::Sunuwar},
    {0x11C00, 0x11C08, script::Bhaiksuki},
    {0x11C0A, 0x11C36, script::Bhaiksuki},
    {0x11C38, 0x11C45, script::Bhaiksuki},
    {0x11C50, 0x11C6C, script::Bhaiksuki},
    {0x11C70, 0x11C8F, script::Marchen},
    {0x11C92, 0x11CA7, script::Marchen},
    {0x11CA9, 0x11CB6, script::Marchen},
    {0x11D00, 0x11D06, script::Masaram_Gondi},
    {0x11D08, 0x11D09, script::Masaram_Gondi},
    {0x11D0B, 0x11D36, script::Masaram_Gondi},
    {0x11D3A, 0x11D3A, script::Masaram_Gondi},
    {0x11D3C, 0x11D3D, script::Masaram_Gondi},
    {0x11D3F, 0x11D47, script::Masaram_Gondi},
    {0x11D50, 0x11D59, script::Masaram_Gondi},
    {0x11D60, 0x11D65, script::Gunjala_Gondi},
    {0x11D67, 0x11D68, script::Gunjala_Gondi},
    {0x11D6A, 0x11D8E, script::Gunjala_Gondi},
    {0x11D90, 0x11D91, script::Gunjala_Gondi},
    {0x11D93, 0x11D98, script::Gunjala_Gondi},
    {0x11DA0, 0x11DA9, script::Gunjala_Gondi},
    {0x11EE0, 0x11EF8, script::Makasar},
    {0x11F00, 0x11F10, script::Kawi},
    {0x11F12, 0x11F3A, script::Kawi},
    {0x11F3E, 0x11F5A, script::Kawi},
    {0x11FB0, 0x11FB0, script::Lisu},
    {0x11FC0, 0x11FF1, script::Tamil},
    {0x11FFF, 0x11FFF, script::Tamil},
    {0x12000, 0x12399, script::Cuneiform},
    {0x12400, 0x1246E, script::Cuneiform},
    {0x12470, 0x12474, script::Cuneiform},
    {0x12480, 0x12543, script::Cuneiform},
    {0x12F90, 0x12FF2, script::Cypro_Minoan},
    {0x13000, 0x13455, script::Egyptian_Hieroglyphs},
    {0x13460, 0x143FA, script::Egyptian_Hieroglyphs},
    {0x14400, 0x14646, script::Anatolian_Hieroglyphs},
    {0x16100, 0x16139, script::Gurung_Khema},
    {0x16800, 0x16A38, script::Bamum},
    {0x16A40, 0x16A5E, script::Mro},
    {0x16A60, 0x16A69, script::Mro},
    {0x16A6E, 0x16A6F, script::Mro},
    {0x16A70, 0x16ABE, script::Tangsa},
    {0x16AC0, 0x16AC9, script::Tangsa},
    {0x16AD0, 0x16AED, script::Bassa_Vah},
    {0x16AF0, 0x16AF5, script::Bassa_Vah},
    {0x16B00, 0x16B45, script::Pahawh_Hmong},
    {0x16B50, 0x16B59, script::Pahawh_Hmong},
    {0x16B5B, 0x16B61, script::Pahawh_Hmong},
    {0x16B63, 0x16B77, script::Pahawh_Hmong},
    {0x16B7D, 0x16B8F, script::Pahawh_Hmong},
    {0x16D40, 0x16D79, script::Kirat_Rai},
    {0x16E40, 0x16E9A, script::Medefaidrin},
    {0x16F00, 0x16F4A, script::Miao},
    {0x16F4F, 0x16F87, script::Miao},
    {0x16F8F, 0x16F9F, script::Miao},
    {0x16FE0, 0x16FE0, script::Tangut},
    {0x16FE1, 0x16FE1, script::Nushu},
    {0x16FE2, 0x16FE3, script::Han},
    {0x16FE4, 0x16FE4, script::Khitan_Small_Script},
    {0x16FF0, 0x16FF1, script::Han},
    {0x17000, 0x187F7, script::Tangut},
    {0x18800, 0x18AFF, script::Tangut},
    {0x18B00, 0x18CD5, script::Khitan_Small_Script},
    {0x18CFF, 0x18CFF, script::Khitan_Small_Script},
    {0x18D00, 0x18D08, script::Tangut},
    {0x1AFF0, 0x1AFF3, script::Katakana},
    {0x1AFF5, 0x1AFFB, script::Katakana},
    {0x1AFFD, 0x1AFFE, script::Katakana},
    {0x1B000, 0x1B000, script::Katakana},
    {0x1B001, 0x1B11F, script::Hiragana},
    {0x1B120, 0x1B122, script::Katakana},
    {0x1B132, 0x1B132, script::Hiragana},
    {0x1B150, 0x1B152, script::Hiragana},
    {0x1B155, 0x1B155, script::Katakana},
    {0x1B164, 0x1B167, script::Katakana},
    {0x1B170, 0x1B2FB, script::Nushu},
    {0x1BC00, 0x1BC6A, script::Duployan},
    {0x1BC70, 0x1BC7C, script::Duployan},
    {0x1BC80, 0x1BC88, script::Duployan},
    {0x1BC90, 0x1BC99, script::Duployan},
    {0x1BC9C, 0x1BC9F, script::Duployan},
    {0x1BCA0, 0x1BCA3, script::Common},
    {0x1CC00, 0x1CCF9, script::Common},
    {0x1CD00, 0x1CEB3, script::Common},
    {0x1CF00, 0x1CF2D, script::Inherited},
    {0x1CF30, 0x1CF46, script::Inherited},
    {0x1CF50, 0x1CFC3, script::Common},
    {0x1D000, 0x1D0F5, script::Common},
    {0x1D100, 0x1D126, script::Common},
    {0x1D129, 0x1D166, script::Common},
    {0x1D167, 0x1D169, script::Inherited},
    {0x1D16A, 0x1D17A, script::Common},
    {0x1D17B, 0x1D182, script::Inherited},
    {0x1D183, 0x1D184, script::Common},
    {0x1D185, 0x1D18B, script::Inherited},
    {0x1D18C, 0x1D1A9, script::Common},
    {0x1D1AA, 0x1D1AD, script::Inherited},
    {0x1D1AE, 0x1D1EA, script::Common},
    {0x1D200, 0x1D245, script::Greek},
    {0x1D2C0, 0x1D2D3, script::Common},
    {0x1D2E0, 0x1D2F3, script::Common},
    {0x1D300, 0x1D356, script::Common},
    {0x1D360, 0x1D378, script::Common},
    {0x1D400, 0x1D454, script::Common},
    {0x1D456, 0x1D49C, script::Common},
    {0x1D49E, 0x1D49F, script::Common},
    {0x1D4A2, 0x1D4A2, script::Common},
    {0x1D4A5, 0x1D4A6, script::Common},
    {0x1D4A9, 0x1D4AC, script::Common},
    {0x1D4AE, 0x1D4B9, script::Common},
    {0x1D4BB, 0x1D4BB, script::Common},
    {0x1D4BD, 0x1D4C3, script::Common},
    {0x1D4C5, 0x1D505, script::Common},
    {0x1D507, 0x1D50A, script::Common},
    {0x1D50D, 0x1D514, script::Common},
    {0x1D516, 0x1D51C, script::Common},
    {0x1D51E, 0x1D539, script::Common},
    {0x1D53B, 0x1D53E, script::Common},
    {0x1D540, 0x1D544, script::Common},
    {0x1D546, 0x1D546, script::Common},
    {0x1D54A, 0x1D550, script::Common},
    {0x1D552, 0x1D6A5, script::Common},
    {0x1D6A8, 0x1D7CB, script::Common},
    {0x1D7CE, 0x1D7FF, script::Common},
    {0x1D800, 0x1DA8B, script::SignWriting},
    {0x1DA9B, 0x1DA9F, script::SignWriting},
    {0x1DAA1, 0x1DAAF, script::SignWriting},
    {0x1DF00, 0x1DF1E, script::Latin},
    {0x1DF25, 0x1DF2A, script::Latin},
    {0x1E000, 0x1E006, script::Glagolitic},
    {0x1E008, 0x1E018, script::Glagolitic},
    {0x1E01B, 0x1E021, script::Glagolitic},
    {0x1E023, 0x1E024, script::Glagolitic},
    {0x1E026, 0x1E02A, script::Glagolitic},
    {0x1E030, 0x1E06D, script::Cyrillic},
    {0x1E08F, 0x1E08F, script::Cyrillic},
    {0x1E100, 0x1E12C, script::Nyiakeng_Puachue_Hmong},
    {0x1E130, 0x1E13D, script::Nyiakeng_Puachue_Hmong},
    {0x1E140, 0x1E149, script::Nyiakeng_Puachue_Hmong},
    {0x1E14E, 0x1E14F, script::Nyiakeng_Puachue_Hmong},
    {0x1E290, 0x1E2AE, script::Toto},
    {0x1E2C0, 0x1E2F9, script::Wancho},
    {0x1E2FF, 0x1E2FF, script::Wancho},
    {0x1E4D0, 0x1E4F9, script::Nag_Mundari},
    {0x1E5D0, 0x1E5FA, script::Ol_Onal},
    {0x1E5FF, 0x1E5FF, script::Ol_Onal},
    {0x1E7E0, 0x1E7E6, script::Ethiopic},
    {0x1E7E8, 0x1E7EB, script::Ethiopic},
    {0x1E7ED, 0x1E7EE, script::Ethiopic},
    {0x1E7F0, 0x1E7FE, script::Ethiopic},
    {0x1E800, 0x1E8C4, script::Mende_Kikakui},
    {0x1E8C7, 0x1E8D6, script::Mende_Kikakui},
    {0x1E900, 0x1E94B, script::Adlam},
    {0x1E950, 0x1E959, script::Adlam},
    {0x1E95E, 0x1E95F, script::Adlam},
    {0x1EC71, 0x1ECB4, script::Common},
    {0x1ED01, 0x1ED3D, script::Common},
    {0x1EE00, 0x1EE03, script::Arabic},
    {0x1EE05, 0x1EE1F, script::Arabic},
    {0x1EE21, 0x1EE22, script::Arabic},
    {0x1EE24, 0x1EE24, script::Arabic},
    {0x1EE27, 0x1EE27, script::Arabic},
    {0x1EE29, 0x1EE32, script::Arabic},
    {0x1EE34, 0x1EE37, script::Arabic},
    {0x1EE39, 0x1EE39, script::Arabic},
    {0x1EE3B, 0x1EE3B, script::Arabic},
    {0x1EE42, 0x1EE42, script::Arabic},
    {0x1EE47, 0x1EE47, script::Arabic},
    {0x1EE49, 0x1EE49, script::Arabic},
    {0x1EE4B, 0x1EE4B, script::Arabic},
    {0x1EE4D, 0x1EE4F, script::Arabic},
    {0x1EE51, 0x1EE52, script::Arabic},
    {0x1EE54, 0x1EE54, script::Arabic},
    {0x1EE57, 0x1EE57, script::Arabic},
    {0x1EE59, 0x1EE59, script::Arabic},
    {0x1EE5B, 0x1EE5B, script::Arabic},
    {0x1EE5D, 0x1EE5D, script::Arabic},
    {0x1EE5F, 0x1EE5F, script::Arabic},
    {0x1EE61, 0x1EE62, script::Arabic},
    {0x1EE64, 0x1EE64, script::Arabic},
    {0x1EE67, 0x1EE6A, script::Arabic},
    {0x1EE6C, 0x1EE72, script::Arabic},
    {0x1EE74, 0x1EE77, script::Arabic},
    {0x1EE79, 0x1EE7C, script::Arabic},
    {0x1EE7E, 0x1EE7E, script::Arabic},
    {0x1EE80, 0x1EE89, script::Arabic},
    {0x1EE8B, 0x1EE9B, script::Arabic},
    {0x1EEA1, 0x1EEA3, script::Arabic},
    {0x1EEA5, 0x1EEA9, script::Arabic},
    {0x1EEAB, 0x1EEBB, script::Arabic},
    {0x1EEF0, 0x1EEF1, script::Arabic},
    {0x1F000, 0x1F02B, script::Common},
    {0x1F030, 0x1F093, script::Common},
    {0x1F0A0, 0x1F0AE, script::Common},
    {0x1F0B1, 0x1F0BF, script::Common},
    {0x1F0C1, 0x1F0CF, script::Common},
    {0x1F0D1, 0x1F0F5, script::Common},
    {0x1F100, 0x1F1AD, script::Common},
    {0x1F1E6, 0x1F1FF, script::Common},
    {0x1F200, 0x1F200, script::Hiragana},
    {0x1F201, 0x1F202, script::Common},
    {0x1F210, 0x1F23B, script::Common},
    {0x1F240, 0x1F248, script::Common},
    {0x1F250, 0x1F251, script::Common},
    {0x1F260, 0x1F265, script::Common},
    {0x1F300, 0x1F6D7, script::Common},
    {0x1F6DC, 0x1F6EC, script::Common},
    {0x1F6F0, 0x1F6FC, script::Common},
    {0x1F700, 0x1F776, script::Common},
    {0x1F77B, 0x1F7D9, script::Common},
    {0x1F7E0, 0x1F7EB, script::Common},
    {0x1F7F0, 0x1F7F0, script::Common},
    {0x1F800, 0x1F80B, script::Common},
    {0x1F810, 0x1F847, script::Common},
    {0x1F850, 0x1F859, script::Common},
    {0x1F860, 0x1F887, script::Common},
    {0x1F890, 0x1F8AD, script::Common},
    {0x1F8B0, 0x1F8BB, script::Common},
    {0x1F8C0, 0x1F8C1, script::Common},
    {0x1F900, 0x1FA53, script::Common},
    {0x1FA60, 0x1FA6D, script::Common},
    {0x1FA70, 0x1FA7C, script::Common},
    {0x1FA80, 0x1FA89, script::Common},
    {0x1FA8F, 0x1FAC6, script::Common},
    {0x1FACE, 0x1FADC, script::Common},
    {0x1FADF, 0x1FAE9, script::Common},
    {0x1FAF0, 0x1FAF8, script::Common},
    {0x1FB00, 0x1FB92, script::Common},
    {0x1FB94, 0x1FBF9, script::Common},
    {0x20000, 0x2A6DF, script::Han},
    {0x2A700, 0x2B739, script::Han},
    {0x2B740, 0x2B81D, script::Han},
    {0x2B820, 0x2CEA1, script::Han},
    {0x2CEB0, 0x2EBE0, script::Han},
    {0x2EBF0, 0x2EE5D, script::Han},
    {0x2F800, 0x2FA1D, script::Han},
    {0x30000, 0x3134A, script::Han},
    {0x31350, 0x323AF, script::Han},
    {0xE0001, 0xE0001, script::Common},
    {0xE0020, 0xE007F, script::Common},
    {0xE0100, 0xE01EF, script::Inherited},
  };

  //! \brief The Script of \p cp (binary search; `Unknown` when no range covers it).
  constexpr script script_of(char32_t cp)
  {
    std::size_t lo {0};
    std::size_t hi {sizeof(script_ranges) / sizeof(script_ranges[0])};
    while (lo < hi) {
      const std::size_t mid {lo + ((hi - lo) / 2)};
      if (script_ranges[mid].hi < cp) {
        lo = mid + 1;
      }
      else {
        hi = mid;
      }
    }
    const std::size_t n {sizeof(script_ranges) / sizeof(script_ranges[0])};
    if (lo < n && cp >= script_ranges[lo].lo && cp <= script_ranges[lo].hi) {
      return script_ranges[lo].sc;
    }
    return script::Unknown;
  }

  //! \brief Whether \p cp belongs to Script \p sc (== the UCD).
  constexpr bool is_script_cp(script sc, char32_t cp) { return script_of(cp) == sc; }

  //! \brief A loose-normalized (lowercase, no _/-/space) Script name and its value.
  struct script_alias_entry { std::string_view name; script sc; };

  //! \brief Script names, loose-keyed; for the `\p{sc=...}` parser.
  inline constexpr script_alias_entry script_aliases[] {
    {"adlam", script::Adlam},
    {"ahom", script::Ahom},
    {"anatolianhieroglyphs", script::Anatolian_Hieroglyphs},
    {"arabic", script::Arabic},
    {"armenian", script::Armenian},
    {"avestan", script::Avestan},
    {"balinese", script::Balinese},
    {"bamum", script::Bamum},
    {"bassavah", script::Bassa_Vah},
    {"batak", script::Batak},
    {"bengali", script::Bengali},
    {"bhaiksuki", script::Bhaiksuki},
    {"bopomofo", script::Bopomofo},
    {"brahmi", script::Brahmi},
    {"braille", script::Braille},
    {"buginese", script::Buginese},
    {"buhid", script::Buhid},
    {"canadianaboriginal", script::Canadian_Aboriginal},
    {"carian", script::Carian},
    {"caucasianalbanian", script::Caucasian_Albanian},
    {"chakma", script::Chakma},
    {"cham", script::Cham},
    {"cherokee", script::Cherokee},
    {"chorasmian", script::Chorasmian},
    {"common", script::Common},
    {"coptic", script::Coptic},
    {"cuneiform", script::Cuneiform},
    {"cypriot", script::Cypriot},
    {"cyprominoan", script::Cypro_Minoan},
    {"cyrillic", script::Cyrillic},
    {"deseret", script::Deseret},
    {"devanagari", script::Devanagari},
    {"divesakuru", script::Dives_Akuru},
    {"dogra", script::Dogra},
    {"duployan", script::Duployan},
    {"egyptianhieroglyphs", script::Egyptian_Hieroglyphs},
    {"elbasan", script::Elbasan},
    {"elymaic", script::Elymaic},
    {"ethiopic", script::Ethiopic},
    {"garay", script::Garay},
    {"georgian", script::Georgian},
    {"glagolitic", script::Glagolitic},
    {"gothic", script::Gothic},
    {"grantha", script::Grantha},
    {"greek", script::Greek},
    {"gujarati", script::Gujarati},
    {"gunjalagondi", script::Gunjala_Gondi},
    {"gurmukhi", script::Gurmukhi},
    {"gurungkhema", script::Gurung_Khema},
    {"han", script::Han},
    {"hangul", script::Hangul},
    {"hanifirohingya", script::Hanifi_Rohingya},
    {"hanunoo", script::Hanunoo},
    {"hatran", script::Hatran},
    {"hebrew", script::Hebrew},
    {"hiragana", script::Hiragana},
    {"imperialaramaic", script::Imperial_Aramaic},
    {"inherited", script::Inherited},
    {"inscriptionalpahlavi", script::Inscriptional_Pahlavi},
    {"inscriptionalparthian", script::Inscriptional_Parthian},
    {"javanese", script::Javanese},
    {"kaithi", script::Kaithi},
    {"kannada", script::Kannada},
    {"katakana", script::Katakana},
    {"kawi", script::Kawi},
    {"kayahli", script::Kayah_Li},
    {"kharoshthi", script::Kharoshthi},
    {"khitansmallscript", script::Khitan_Small_Script},
    {"khmer", script::Khmer},
    {"khojki", script::Khojki},
    {"khudawadi", script::Khudawadi},
    {"kiratrai", script::Kirat_Rai},
    {"lao", script::Lao},
    {"latin", script::Latin},
    {"lepcha", script::Lepcha},
    {"limbu", script::Limbu},
    {"lineara", script::Linear_A},
    {"linearb", script::Linear_B},
    {"lisu", script::Lisu},
    {"lycian", script::Lycian},
    {"lydian", script::Lydian},
    {"mahajani", script::Mahajani},
    {"makasar", script::Makasar},
    {"malayalam", script::Malayalam},
    {"mandaic", script::Mandaic},
    {"manichaean", script::Manichaean},
    {"marchen", script::Marchen},
    {"masaramgondi", script::Masaram_Gondi},
    {"medefaidrin", script::Medefaidrin},
    {"meeteimayek", script::Meetei_Mayek},
    {"mendekikakui", script::Mende_Kikakui},
    {"meroiticcursive", script::Meroitic_Cursive},
    {"meroitichieroglyphs", script::Meroitic_Hieroglyphs},
    {"miao", script::Miao},
    {"modi", script::Modi},
    {"mongolian", script::Mongolian},
    {"mro", script::Mro},
    {"multani", script::Multani},
    {"myanmar", script::Myanmar},
    {"nabataean", script::Nabataean},
    {"nagmundari", script::Nag_Mundari},
    {"nandinagari", script::Nandinagari},
    {"newtailue", script::New_Tai_Lue},
    {"newa", script::Newa},
    {"nko", script::Nko},
    {"nushu", script::Nushu},
    {"nyiakengpuachuehmong", script::Nyiakeng_Puachue_Hmong},
    {"ogham", script::Ogham},
    {"olchiki", script::Ol_Chiki},
    {"olonal", script::Ol_Onal},
    {"oldhungarian", script::Old_Hungarian},
    {"olditalic", script::Old_Italic},
    {"oldnortharabian", script::Old_North_Arabian},
    {"oldpermic", script::Old_Permic},
    {"oldpersian", script::Old_Persian},
    {"oldsogdian", script::Old_Sogdian},
    {"oldsoutharabian", script::Old_South_Arabian},
    {"oldturkic", script::Old_Turkic},
    {"olduyghur", script::Old_Uyghur},
    {"oriya", script::Oriya},
    {"osage", script::Osage},
    {"osmanya", script::Osmanya},
    {"pahawhhmong", script::Pahawh_Hmong},
    {"palmyrene", script::Palmyrene},
    {"paucinhau", script::Pau_Cin_Hau},
    {"phagspa", script::Phags_Pa},
    {"phoenician", script::Phoenician},
    {"psalterpahlavi", script::Psalter_Pahlavi},
    {"rejang", script::Rejang},
    {"runic", script::Runic},
    {"samaritan", script::Samaritan},
    {"saurashtra", script::Saurashtra},
    {"sharada", script::Sharada},
    {"shavian", script::Shavian},
    {"siddham", script::Siddham},
    {"signwriting", script::SignWriting},
    {"sinhala", script::Sinhala},
    {"sogdian", script::Sogdian},
    {"sorasompeng", script::Sora_Sompeng},
    {"soyombo", script::Soyombo},
    {"sundanese", script::Sundanese},
    {"sunuwar", script::Sunuwar},
    {"sylotinagri", script::Syloti_Nagri},
    {"syriac", script::Syriac},
    {"tagalog", script::Tagalog},
    {"tagbanwa", script::Tagbanwa},
    {"taile", script::Tai_Le},
    {"taitham", script::Tai_Tham},
    {"taiviet", script::Tai_Viet},
    {"takri", script::Takri},
    {"tamil", script::Tamil},
    {"tangsa", script::Tangsa},
    {"tangut", script::Tangut},
    {"telugu", script::Telugu},
    {"thaana", script::Thaana},
    {"thai", script::Thai},
    {"tibetan", script::Tibetan},
    {"tifinagh", script::Tifinagh},
    {"tirhuta", script::Tirhuta},
    {"todhri", script::Todhri},
    {"toto", script::Toto},
    {"tulutigalari", script::Tulu_Tigalari},
    {"ugaritic", script::Ugaritic},
    {"vai", script::Vai},
    {"vithkuqi", script::Vithkuqi},
    {"wancho", script::Wancho},
    {"warangciti", script::Warang_Citi},
    {"yezidi", script::Yezidi},
    {"yi", script::Yi},
    {"zanabazarsquare", script::Zanabazar_Square},
  };

  //! \brief Resolve a loose-normalized Script name to its value, or `count` if unknown.
  constexpr script resolve_script(std::string_view loose)
  {
    for (const script_alias_entry& a : script_aliases) {
      if (a.name == loose) {
        return a.sc;
      }
    }
    return script::count;
  }

} // namespace real::detail

#endif // REAL_UNICODE_SCRIPT_HPP
