1 line
80 KiB
Plaintext
1 line
80 KiB
Plaintext
{"version":3,"file":"utrie.es5.js","sources":["../../src/Util.ts","../../src/Trie.ts","../node_modules/src/index.ts","../../src/TrieBuilder.ts"],"sourcesContent":["const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nexport const decode = (base64: string): ArrayBuffer | number[] => {\n let bufferLength = base64.length * 0.75,\n len = base64.length,\n i,\n p = 0,\n encoded1,\n encoded2,\n encoded3,\n encoded4;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n const buffer =\n typeof ArrayBuffer !== 'undefined' &&\n typeof Uint8Array !== 'undefined' &&\n typeof Uint8Array.prototype.slice !== 'undefined'\n ? new ArrayBuffer(bufferLength)\n : new Array(bufferLength);\n const bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return buffer;\n};\n\nexport const polyUint16Array = (buffer: number[]): number[] => {\n const length = buffer.length;\n const bytes = [];\n for (let i = 0; i < length; i += 2) {\n bytes.push((buffer[i + 1] << 8) | buffer[i]);\n }\n return bytes;\n};\n\nexport const polyUint32Array = (buffer: number[]): number[] => {\n const length = buffer.length;\n const bytes = [];\n for (let i = 0; i < length; i += 4) {\n bytes.push((buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | buffer[i]);\n }\n return bytes;\n};\n","import {decode, polyUint16Array, polyUint32Array} from './Util';\n\nexport type int = number;\n\n/** Shift size for getting the index-2 table offset. */\nexport const UTRIE2_SHIFT_2 = 5;\n\n/** Shift size for getting the index-1 table offset. */\nexport const UTRIE2_SHIFT_1 = 6 + 5;\n\n/**\n * Shift size for shifting left the index array values.\n * Increases possible data size with 16-bit index values at the cost\n * of compactability.\n * This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.\n */\nexport const UTRIE2_INDEX_SHIFT = 2;\n\n/**\n * Difference between the two shift sizes,\n * for getting an index-1 offset from an index-2 offset. 6=11-5\n */\nexport const UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2;\n\n/**\n * The part of the index-2 table for U+D800..U+DBFF stores values for\n * lead surrogate code _units_ not code _points_.\n * Values for lead surrogate code _points_ are indexed with this portion of the table.\n * Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)\n */\nexport const UTRIE2_LSCP_INDEX_2_OFFSET = 0x10000 >> UTRIE2_SHIFT_2;\n\n/** Number of entries in a data block. 32=0x20 */\nexport const UTRIE2_DATA_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_2;\n/** Mask for getting the lower bits for the in-data-block offset. */\nexport const UTRIE2_DATA_MASK = UTRIE2_DATA_BLOCK_LENGTH - 1;\n\nexport const UTRIE2_LSCP_INDEX_2_LENGTH = 0x400 >> UTRIE2_SHIFT_2;\n/** Count the lengths of both BMP pieces. 2080=0x820 */\nexport const UTRIE2_INDEX_2_BMP_LENGTH = UTRIE2_LSCP_INDEX_2_OFFSET + UTRIE2_LSCP_INDEX_2_LENGTH;\n/**\n * The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.\n * Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2.\n */\nexport const UTRIE2_UTF8_2B_INDEX_2_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;\nexport const UTRIE2_UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */\n/**\n * The index-1 table, only used for supplementary code points, at offset 2112=0x840.\n * Variable length, for code points up to highStart, where the last single-value range starts.\n * Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.\n * (For 0x100000 supplementary code points U+10000..U+10ffff.)\n *\n * The part of the index-2 table for supplementary code points starts\n * after this index-1 table.\n *\n * Both the index-1 table and the following part of the index-2 table\n * are omitted completely if there is only BMP data.\n */\nexport const UTRIE2_INDEX_1_OFFSET = UTRIE2_UTF8_2B_INDEX_2_OFFSET + UTRIE2_UTF8_2B_INDEX_2_LENGTH;\n\n/**\n * Number of index-1 entries for the BMP. 32=0x20\n * This part of the index-1 table is omitted from the serialized form.\n */\nexport const UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UTRIE2_SHIFT_1;\n\n/** Number of entries in an index-2 block. 64=0x40 */\nexport const UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_1_2;\n/** Mask for getting the lower bits for the in-index-2-block offset. */\nexport const UTRIE2_INDEX_2_MASK = UTRIE2_INDEX_2_BLOCK_LENGTH - 1;\n\nconst slice16 = (view: number[] | Uint16Array, start: number, end?: number) => {\n if (view.slice) {\n return view.slice(start, end);\n }\n\n return new Uint16Array(Array.prototype.slice.call(view, start, end));\n};\n\nconst slice32 = (view: number[] | Uint32Array, start: number, end?: number) => {\n if (view.slice) {\n return view.slice(start, end);\n }\n\n return new Uint32Array(Array.prototype.slice.call(view, start, end));\n};\n\nexport const createTrieFromBase64 = (base64: string, _byteLength: number): Trie => {\n const buffer = decode(base64);\n const view32 = Array.isArray(buffer) ? polyUint32Array(buffer) : new Uint32Array(buffer);\n const view16 = Array.isArray(buffer) ? polyUint16Array(buffer) : new Uint16Array(buffer);\n const headerLength = 24;\n\n const index = slice16(view16, headerLength / 2, view32[4] / 2);\n const data =\n view32[5] === 2\n ? slice16(view16, (headerLength + view32[4]) / 2)\n : slice32(view32, Math.ceil((headerLength + view32[4]) / 4));\n\n return new Trie(view32[0], view32[1], view32[2], view32[3], index, data);\n};\n\nexport class Trie {\n initialValue: int;\n errorValue: int;\n highStart: int;\n highValueIndex: int;\n index: Uint16Array | number[];\n data: Uint32Array | Uint16Array | number[];\n\n constructor(\n initialValue: int,\n errorValue: int,\n highStart: int,\n highValueIndex: int,\n index: Uint16Array | number[],\n data: Uint32Array | Uint16Array | number[]\n ) {\n this.initialValue = initialValue;\n this.errorValue = errorValue;\n this.highStart = highStart;\n this.highValueIndex = highValueIndex;\n this.index = index;\n this.data = data;\n }\n\n /**\n * Get the value for a code point as stored in the Trie.\n *\n * @param codePoint the code point\n * @return the value\n */\n get(codePoint: number): number {\n let ix;\n if (codePoint >= 0) {\n if (codePoint < 0x0d800 || (codePoint > 0x0dbff && codePoint <= 0x0ffff)) {\n // Ordinary BMP code point, excluding leading surrogates.\n // BMP uses a single level lookup. BMP index starts at offset 0 in the Trie2 index.\n // 16 bit data is stored in the index array itself.\n ix = this.index[codePoint >> UTRIE2_SHIFT_2];\n ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n return this.data[ix];\n }\n\n if (codePoint <= 0xffff) {\n // Lead Surrogate Code Point. A Separate index section is stored for\n // lead surrogate code units and code points.\n // The main index has the code unit data.\n // For this function, we need the code point data.\n // Note: this expression could be refactored for slightly improved efficiency, but\n // surrogate code points will be so rare in practice that it's not worth it.\n ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + ((codePoint - 0xd800) >> UTRIE2_SHIFT_2)];\n ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n return this.data[ix];\n }\n\n if (codePoint < this.highStart) {\n // Supplemental code point, use two-level lookup.\n ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1);\n ix = this.index[ix];\n ix += (codePoint >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK;\n ix = this.index[ix];\n ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n return this.data[ix];\n }\n if (codePoint <= 0x10ffff) {\n return this.data[this.highValueIndex];\n }\n }\n\n // Fall through. The code point is outside of the legal range of 0..0x10ffff.\n return this.errorValue;\n }\n}\n","const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nexport const encode = (arraybuffer: ArrayBuffer): string => {\n let bytes = new Uint8Array(arraybuffer),\n i,\n len = bytes.length,\n base64 = '';\n\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n\n return base64;\n};\n\nexport const decode = (base64: string): ArrayBuffer => {\n let bufferLength = base64.length * 0.75,\n len = base64.length,\n i,\n p = 0,\n encoded1,\n encoded2,\n encoded3,\n encoded4;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n const arraybuffer = new ArrayBuffer(bufferLength),\n bytes = new Uint8Array(arraybuffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return arraybuffer;\n};\n","import {\n UTRIE2_SHIFT_2,\n UTRIE2_INDEX_SHIFT,\n UTRIE2_LSCP_INDEX_2_OFFSET,\n UTRIE2_DATA_BLOCK_LENGTH,\n UTRIE2_DATA_MASK,\n UTRIE2_SHIFT_1,\n UTRIE2_INDEX_1_OFFSET,\n UTRIE2_UTF8_2B_INDEX_2_LENGTH,\n UTRIE2_OMITTED_BMP_INDEX_1_LENGTH,\n UTRIE2_INDEX_2_BMP_LENGTH,\n UTRIE2_LSCP_INDEX_2_LENGTH,\n UTRIE2_INDEX_2_BLOCK_LENGTH,\n UTRIE2_INDEX_2_MASK,\n UTRIE2_SHIFT_1_2,\n Trie,\n int,\n} from './Trie';\n\nimport {encode} from 'base64-arraybuffer';\n\n/**\n * Trie2 constants, defining shift widths, index array lengths, etc.\n *\n * These are needed for the runtime macros but users can treat these as\n * implementation details and skip to the actual public API further below.\n */\n// const UTRIE2_OPTIONS_VALUE_BITS_MASK = 0x000f;\n\n/** Number of code points per index-1 table entry. 2048=0x800 */\nconst UTRIE2_CP_PER_INDEX_1_ENTRY = 1 << UTRIE2_SHIFT_1;\n\n/** The alignment size of a data block. Also the granularity for compaction. */\nconst UTRIE2_DATA_GRANULARITY = 1 << UTRIE2_INDEX_SHIFT;\n/* Fixed layout of the first part of the index array. ------------------- */\n/**\n * The BMP part of the index-2 table is fixed and linear and starts at offset 0.\n * Length=2048=0x800=0x10000>>UTRIE2_SHIFT_2.\n */\nconst UTRIE2_INDEX_2_OFFSET = 0;\n\nconst UTRIE2_MAX_INDEX_1_LENGTH = 0x100000 >> UTRIE2_SHIFT_1;\n/*\n * Fixed layout of the first part of the data array. -----------------------\n * Starts with 4 blocks (128=0x80 entries) for ASCII.\n */\n/**\n * The illegal-UTF-8 data block follows the ASCII block, at offset 128=0x80.\n * Used with linear access for single bytes 0..0xbf for simple error handling.\n * Length 64=0x40, not UTRIE2_DATA_BLOCK_LENGTH.\n */\nconst UTRIE2_BAD_UTF8_DATA_OFFSET = 0x80;\n/** The start of non-linear-ASCII data blocks, at offset 192=0xc0. */\nconst UTRIE2_DATA_START_OFFSET = 0xc0;\n/* Building a Trie2 ---------------------------------------------------------- */\n/*\n * These definitions are mostly needed by utrie2_builder.c, but also by\n * utrie2_get32() and utrie2_enum().\n */\n/*\n * At build time, leave a gap in the index-2 table,\n * at least as long as the maximum lengths of the 2-byte UTF-8 index-2 table\n * and the supplementary index-1 table.\n * Round up to UTRIE2_INDEX_2_BLOCK_LENGTH for proper compacting.\n */\nconst UNEWTRIE2_INDEX_GAP_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;\nconst UNEWTRIE2_INDEX_GAP_LENGTH =\n (UTRIE2_UTF8_2B_INDEX_2_LENGTH + UTRIE2_MAX_INDEX_1_LENGTH + UTRIE2_INDEX_2_MASK) & ~UTRIE2_INDEX_2_MASK;\n/**\n * Maximum length of the build-time index-2 array.\n * Maximum number of Unicode code points (0x110000) shifted right by UTRIE2_SHIFT_2,\n * plus the part of the index-2 table for lead surrogate code points,\n * plus the build-time index gap,\n * plus the null index-2 block.\n */\nconst UNEWTRIE2_MAX_INDEX_2_LENGTH =\n (0x110000 >> UTRIE2_SHIFT_2) +\n UTRIE2_LSCP_INDEX_2_LENGTH +\n UNEWTRIE2_INDEX_GAP_LENGTH +\n UTRIE2_INDEX_2_BLOCK_LENGTH;\nconst UNEWTRIE2_INDEX_1_LENGTH = 0x110000 >> UTRIE2_SHIFT_1;\n/**\n * Maximum length of the build-time data array.\n * One entry per 0x110000 code points, plus the illegal-UTF-8 block and the null block,\n * plus values for the 0x400 surrogate code units.\n */\nconst UNEWTRIE2_MAX_DATA_LENGTH = 0x110000 + 0x40 + 0x40 + 0x400;\n\n/* Start with allocation of 16k data entries. */\nconst UNEWTRIE2_INITIAL_DATA_LENGTH = 1 << 14;\n/* Grow about 8x each time. */\nconst UNEWTRIE2_MEDIUM_DATA_LENGTH = 1 << 17;\n\n/** The null index-2 block, following the gap in the index-2 table. */\nconst UNEWTRIE2_INDEX_2_NULL_OFFSET = UNEWTRIE2_INDEX_GAP_OFFSET + UNEWTRIE2_INDEX_GAP_LENGTH;\n/** The start of allocated index-2 blocks. */\nconst UNEWTRIE2_INDEX_2_START_OFFSET = UNEWTRIE2_INDEX_2_NULL_OFFSET + UTRIE2_INDEX_2_BLOCK_LENGTH;\n/**\n * The null data block.\n * Length 64=0x40 even if UTRIE2_DATA_BLOCK_LENGTH is smaller,\n * to work with 6-bit trail bytes from 2-byte UTF-8.\n */\nconst UNEWTRIE2_DATA_NULL_OFFSET = UTRIE2_DATA_START_OFFSET;\n/** The start of allocated data blocks. */\nconst UNEWTRIE2_DATA_START_OFFSET = UNEWTRIE2_DATA_NULL_OFFSET + 0x40;\n/**\n * The start of data blocks for U+0800 and above.\n * Below, compaction uses a block length of 64 for 2-byte UTF-8.\n * From here on, compaction uses UTRIE2_DATA_BLOCK_LENGTH.\n * Data values for 0x780 code points beyond ASCII.\n */\nconst UNEWTRIE2_DATA_0800_OFFSET = UNEWTRIE2_DATA_START_OFFSET + 0x780;\n\n/**\n * Maximum length of the runtime index array.\n * Limited by its own 16-bit index values, and by uint16_t UTrie2Header.indexLength.\n * (The actual maximum length is lower,\n * (0x110000>>UTRIE2_SHIFT_2)+UTRIE2_UTF8_2B_INDEX_2_LENGTH+UTRIE2_MAX_INDEX_1_LENGTH.)\n */\nconst UTRIE2_MAX_INDEX_LENGTH = 0xffff;\n/**\n * Maximum length of the runtime data array.\n * Limited by 16-bit index values that are left-shifted by UTRIE2_INDEX_SHIFT,\n * and by uint16_t UTrie2Header.shiftedDataLength.\n */\nconst UTRIE2_MAX_DATA_LENGTH = 0xffff << UTRIE2_INDEX_SHIFT;\n\nexport const BITS_16 = 16;\nexport const BITS_32 = 32;\n\nconst isHighSurrogate = (c: int): boolean => c >= 0xd800 && c <= 0xdbff;\n\nconst equalInt = (a: Uint32Array, s: int, t: int, length: int): boolean => {\n for (let i = 0; i < length; i++) {\n if (a[s + i] !== a[t + i]) {\n return false;\n }\n }\n return true;\n};\n\nexport class TrieBuilder {\n index1: Uint32Array;\n index2: Uint32Array;\n map: Uint32Array;\n data: Uint32Array;\n dataCapacity: int;\n initialValue: int;\n errorValue: int;\n highStart: int;\n dataNullOffset: int;\n dataLength: int;\n index2NullOffset: int;\n index2Length: int;\n firstFreeBlock: int;\n isCompacted: boolean;\n\n constructor(initialValue: int = 0, errorValue: int = 0) {\n this.initialValue = initialValue;\n this.errorValue = errorValue;\n this.highStart = 0x110000;\n this.data = new Uint32Array(UNEWTRIE2_INITIAL_DATA_LENGTH);\n this.dataCapacity = UNEWTRIE2_INITIAL_DATA_LENGTH;\n this.highStart = 0x110000;\n this.firstFreeBlock = 0; /* no free block in the list */\n this.isCompacted = false;\n\n this.index1 = new Uint32Array(UNEWTRIE2_INDEX_1_LENGTH);\n this.index2 = new Uint32Array(UNEWTRIE2_MAX_INDEX_2_LENGTH);\n\n /*\n * Multi-purpose per-data-block table.\n *\n * Before compacting:\n *\n * Per-data-block reference counters/free-block list.\n * 0: unused\n * >0: reference counter (number of index-2 entries pointing here)\n * <0: next free data block in free-block list\n *\n * While compacting:\n *\n * Map of adjusted indexes, used in compactData() and compactIndex2().\n * Maps from original indexes to new ones.\n */\n this.map = new Uint32Array(UNEWTRIE2_MAX_DATA_LENGTH >> UTRIE2_SHIFT_2);\n /*\n * preallocate and reset\n * - ASCII\n * - the bad-UTF-8-data block\n * - the null data block\n */\n let i, j;\n for (i = 0; i < 0x80; ++i) {\n this.data[i] = initialValue;\n }\n for (; i < 0xc0; ++i) {\n this.data[i] = errorValue;\n }\n for (i = UNEWTRIE2_DATA_NULL_OFFSET; i < UNEWTRIE2_DATA_START_OFFSET; ++i) {\n this.data[i] = initialValue;\n }\n this.dataNullOffset = UNEWTRIE2_DATA_NULL_OFFSET;\n this.dataLength = UNEWTRIE2_DATA_START_OFFSET;\n /* set the index-2 indexes for the 2=0x80>>UTRIE2_SHIFT_2 ASCII data blocks */\n for (i = 0, j = 0; j < 0x80; ++i, j += UTRIE2_DATA_BLOCK_LENGTH) {\n this.index2[i] = j;\n this.map[i] = 1;\n }\n\n /* reference counts for the bad-UTF-8-data block */\n for (; j < 0xc0; ++i, j += UTRIE2_DATA_BLOCK_LENGTH) {\n this.map[i] = 0;\n }\n\n /*\n * Reference counts for the null data block: all blocks except for the ASCII blocks.\n * Plus 1 so that we don't drop this block during compaction.\n * Plus as many as needed for lead surrogate code points.\n */\n /* i==newTrie->dataNullOffset */\n this.map[i++] = (0x110000 >> UTRIE2_SHIFT_2) - (0x80 >> UTRIE2_SHIFT_2) + 1 + UTRIE2_LSCP_INDEX_2_LENGTH;\n j += UTRIE2_DATA_BLOCK_LENGTH;\n for (; j < UNEWTRIE2_DATA_START_OFFSET; ++i, j += UTRIE2_DATA_BLOCK_LENGTH) {\n this.map[i] = 0;\n }\n /*\n * set the remaining indexes in the BMP index-2 block\n * to the null data block\n */\n for (i = 0x80 >> UTRIE2_SHIFT_2; i < UTRIE2_INDEX_2_BMP_LENGTH; ++i) {\n this.index2[i] = UNEWTRIE2_DATA_NULL_OFFSET;\n }\n /*\n * Fill the index gap with impossible values so that compaction\n * does not overlap other index-2 blocks with the gap.\n */\n for (i = 0; i < UNEWTRIE2_INDEX_GAP_LENGTH; ++i) {\n this.index2[UNEWTRIE2_INDEX_GAP_OFFSET + i] = -1;\n }\n /* set the indexes in the null index-2 block */\n for (i = 0; i < UTRIE2_INDEX_2_BLOCK_LENGTH; ++i) {\n this.index2[UNEWTRIE2_INDEX_2_NULL_OFFSET + i] = UNEWTRIE2_DATA_NULL_OFFSET;\n }\n this.index2NullOffset = UNEWTRIE2_INDEX_2_NULL_OFFSET;\n this.index2Length = UNEWTRIE2_INDEX_2_START_OFFSET;\n /* set the index-1 indexes for the linear index-2 block */\n for (i = 0, j = 0; i < UTRIE2_OMITTED_BMP_INDEX_1_LENGTH; ++i, j += UTRIE2_INDEX_2_BLOCK_LENGTH) {\n this.index1[i] = j;\n }\n /* set the remaining index-1 indexes to the null index-2 block */\n for (; i < UNEWTRIE2_INDEX_1_LENGTH; ++i) {\n this.index1[i] = UNEWTRIE2_INDEX_2_NULL_OFFSET;\n }\n /*\n * Preallocate and reset data for U+0080..U+07ff,\n * for 2-byte UTF-8 which will be compacted in 64-blocks\n * even if UTRIE2_DATA_BLOCK_LENGTH is smaller.\n */\n for (i = 0x80; i < 0x800; i += UTRIE2_DATA_BLOCK_LENGTH) {\n this.set(i, initialValue);\n }\n }\n\n /**\n * Set a value for a code point.\n *\n * @param c the code point\n * @param value the value\n */\n set(c: int, value: int): TrieBuilder {\n if (c < 0 || c > 0x10ffff) {\n throw new Error('Invalid code point.');\n }\n this._set(c, true, value);\n return this;\n }\n\n /**\n * Set a value in a range of code points [start..end].\n * All code points c with start<=c<=end will get the value if\n * overwrite is TRUE or if the old value is the initial value.\n *\n * @param start the first code point to get the value\n * @param end the last code point to get the value (inclusive)\n * @param value the value\n * @param overwrite flag for whether old non-initial values are to be overwritten\n */\n setRange(start: int, end: int, value: int, overwrite: boolean = false): TrieBuilder {\n /*\n * repeat value in [start..end]\n * mark index values for repeat-data blocks by setting bit 31 of the index values\n * fill around existing values if any, if(overwrite)\n */\n let block, rest, repeatBlock;\n if (start > 0x10ffff || start < 0 || end > 0x10ffff || end < 0 || start > end) {\n throw new Error('Invalid code point range.');\n }\n if (!overwrite && value === this.initialValue) {\n return this; /* nothing to do */\n }\n if (this.isCompacted) {\n throw new Error('Trie was already compacted');\n }\n let limit = end + 1;\n if ((start & UTRIE2_DATA_MASK) !== 0) {\n /* set partial block at [start..following block boundary[ */\n block = this.getDataBlock(start, true);\n const nextStart = (start + UTRIE2_DATA_BLOCK_LENGTH) & ~UTRIE2_DATA_MASK;\n if (nextStart <= limit) {\n this.fillBlock(\n block,\n start & UTRIE2_DATA_MASK,\n UTRIE2_DATA_BLOCK_LENGTH,\n value,\n this.initialValue,\n overwrite\n );\n start = nextStart;\n } else {\n this.fillBlock(\n block,\n start & UTRIE2_DATA_MASK,\n limit & UTRIE2_DATA_MASK,\n value,\n this.initialValue,\n overwrite\n );\n return this;\n }\n }\n /* number of positions in the last, partial block */\n rest = limit & UTRIE2_DATA_MASK;\n /* round down limit to a block boundary */\n limit &= ~UTRIE2_DATA_MASK;\n /* iterate over all-value blocks */\n repeatBlock = value === this.initialValue ? this.dataNullOffset : -1;\n\n while (start < limit) {\n let i2;\n let setRepeatBlock = false;\n if (value === this.initialValue && this.isInNullBlock(start, true)) {\n start += UTRIE2_DATA_BLOCK_LENGTH; /* nothing to do */\n continue;\n }\n /* get index value */\n i2 = this.getIndex2Block(start, true);\n i2 += (start >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK;\n block = this.index2[i2];\n if (this.isWritableBlock(block)) {\n /* already allocated */\n if (overwrite && block >= UNEWTRIE2_DATA_0800_OFFSET) {\n /*\n * We overwrite all values, and it's not a\n * protected (ASCII-linear or 2-byte UTF-8) block:\n * replace with the repeatBlock.\n */\n setRepeatBlock = true;\n } else {\n /* !overwrite, or protected block: just write the values into this block */\n this.fillBlock(block, 0, UTRIE2_DATA_BLOCK_LENGTH, value, this.initialValue, overwrite);\n }\n } else if (this.data[block] !== value && (overwrite || block === this.dataNullOffset)) {\n /*\n * Set the repeatBlock instead of the null block or previous repeat block:\n *\n * If !isWritableBlock() then all entries in the block have the same value\n * because it's the null block or a range block (the repeatBlock from a previous\n * call to utrie2_setRange32()).\n * No other blocks are used multiple times before compacting.\n *\n * The null block is the only non-writable block with the initialValue because\n * of the repeatBlock initialization above. (If value==initialValue, then\n * the repeatBlock will be the null data block.)\n *\n * We set our repeatBlock if the desired value differs from the block's value,\n * and if we overwrite any data or if the data is all initial values\n * (which is the same as the block being the null block, see above).\n */\n setRepeatBlock = true;\n }\n if (setRepeatBlock) {\n if (repeatBlock >= 0) {\n this.setIndex2Entry(i2, repeatBlock);\n } else {\n /* create and set and fill the repeatBlock */\n repeatBlock = this.getDataBlock(start, true);\n this.writeBlock(repeatBlock, value);\n }\n }\n start += UTRIE2_DATA_BLOCK_LENGTH;\n }\n if (rest > 0) {\n /* set partial block at [last block boundary..limit[ */\n block = this.getDataBlock(start, true);\n this.fillBlock(block, 0, rest, value, this.initialValue, overwrite);\n }\n return this;\n }\n\n /**\n * Get the value for a code point as stored in the Trie2.\n *\n * @param codePoint the code point\n * @return the value\n */\n\n get(codePoint: int): int {\n if (codePoint < 0 || codePoint > 0x10ffff) {\n return this.errorValue;\n } else {\n return this._get(codePoint, true);\n }\n }\n\n _get(c: int, fromLSCP: boolean): int {\n let i2;\n if (c >= this.highStart && (!(c >= 0xd800 && c < 0xdc00) || fromLSCP)) {\n return this.data[this.dataLength - UTRIE2_DATA_GRANULARITY];\n }\n if (c >= 0xd800 && c < 0xdc00 && fromLSCP) {\n i2 = UTRIE2_LSCP_INDEX_2_OFFSET - (0xd800 >> UTRIE2_SHIFT_2) + (c >> UTRIE2_SHIFT_2);\n } else {\n i2 = this.index1[c >> UTRIE2_SHIFT_1] + ((c >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK);\n }\n const block = this.index2[i2];\n return this.data[block + (c & UTRIE2_DATA_MASK)];\n }\n\n freeze(valueBits: 16 | 32 = BITS_32): Trie {\n let i;\n let allIndexesLength;\n let dataMove; /* >0 if the data is moved to the end of the index array */\n /* compact if necessary */\n if (!this.isCompacted) {\n this.compactTrie();\n }\n\n allIndexesLength = this.highStart <= 0x10000 ? UTRIE2_INDEX_1_OFFSET : this.index2Length;\n\n if (valueBits === BITS_16) {\n // dataMove = allIndexesLength;\n dataMove = 0;\n } else {\n dataMove = 0;\n }\n /* are indexLength and dataLength within limits? */\n if (\n /* for unshifted indexLength */\n allIndexesLength > UTRIE2_MAX_INDEX_LENGTH ||\n /* for unshifted dataNullOffset */\n dataMove + this.dataNullOffset > 0xffff ||\n /* for unshifted 2-byte UTF-8 index-2 values */\n dataMove + UNEWTRIE2_DATA_0800_OFFSET > 0xffff ||\n /* for shiftedDataLength */\n dataMove + this.dataLength > UTRIE2_MAX_DATA_LENGTH\n ) {\n throw new Error('Trie data is too large.');\n }\n\n const index = new Uint16Array(allIndexesLength);\n\n /* write the index-2 array values shifted right by UTRIE2_INDEX_SHIFT, after adding dataMove */\n let destIdx = 0;\n for (i = 0; i < UTRIE2_INDEX_2_BMP_LENGTH; i++) {\n index[destIdx++] = (this.index2[i] + dataMove) >> UTRIE2_INDEX_SHIFT;\n }\n /* write UTF-8 2-byte index-2 values, not right-shifted */\n for (i = 0; i < 0xc2 - 0xc0; ++i) {\n /* C0..C1 */\n index[destIdx++] = dataMove + UTRIE2_BAD_UTF8_DATA_OFFSET;\n }\n for (; i < 0xe0 - 0xc0; ++i) {\n /* C2..DF */\n index[destIdx++] = dataMove + this.index2[i << (6 - UTRIE2_SHIFT_2)];\n }\n\n if (this.highStart > 0x10000) {\n const index1Length = (this.highStart - 0x10000) >> UTRIE2_SHIFT_1;\n const index2Offset = UTRIE2_INDEX_2_BMP_LENGTH + UTRIE2_UTF8_2B_INDEX_2_LENGTH + index1Length;\n /* write 16-bit index-1 values for supplementary code points */\n for (i = 0; i < index1Length; i++) {\n index[destIdx++] = UTRIE2_INDEX_2_OFFSET + this.index1[i + UTRIE2_OMITTED_BMP_INDEX_1_LENGTH];\n }\n\n /*\n * write the index-2 array values for supplementary code points,\n * shifted right by UTRIE2_INDEX_SHIFT, after adding dataMove\n */\n for (i = 0; i < this.index2Length - index2Offset; i++) {\n index[destIdx++] = (dataMove + this.index2[index2Offset + i]) >> UTRIE2_INDEX_SHIFT;\n }\n }\n\n /* write the 16/32-bit data array */\n switch (valueBits) {\n case BITS_16:\n /* write 16-bit data values */\n const data16 = new Uint16Array(this.dataLength);\n for (i = 0; i < this.dataLength; i++) {\n data16[i] = this.data[i];\n }\n\n return new Trie(\n this.initialValue,\n this.errorValue,\n this.highStart,\n dataMove + this.dataLength - UTRIE2_DATA_GRANULARITY,\n index,\n data16\n );\n case BITS_32:\n /* write 32-bit data values */\n const data32 = new Uint32Array(this.dataLength);\n for (i = 0; i < this.dataLength; i++) {\n data32[i] = this.data[i];\n }\n return new Trie(\n this.initialValue,\n this.errorValue,\n this.highStart,\n dataMove + this.dataLength - UTRIE2_DATA_GRANULARITY,\n index,\n data32\n );\n default:\n throw new Error('Bits should be either 16 or 32');\n }\n }\n\n /*\n * Find the start of the last range in the trie by enumerating backward.\n * Indexes for supplementary code points higher than this will be omitted.\n */\n findHighStart(highValue: int): int {\n let value;\n let i2, j, i2Block, prevI2Block, block, prevBlock;\n /* set variables for previous range */\n if (highValue === this.initialValue) {\n prevI2Block = this.index2NullOffset;\n prevBlock = this.dataNullOffset;\n } else {\n prevI2Block = -1;\n prevBlock = -1;\n }\n let prev = 0x110000;\n /* enumerate index-2 blocks */\n let i1 = UNEWTRIE2_INDEX_1_LENGTH;\n let c = prev;\n while (c > 0) {\n i2Block = this.index1[--i1];\n if (i2Block === prevI2Block) {\n /* the index-2 block is the same as the previous one, and filled with highValue */\n c -= UTRIE2_CP_PER_INDEX_1_ENTRY;\n continue;\n }\n prevI2Block = i2Block;\n if (i2Block === this.index2NullOffset) {\n /* this is the null index-2 block */\n if (highValue !== this.initialValue) {\n return c;\n }\n c -= UTRIE2_CP_PER_INDEX_1_ENTRY;\n } else {\n /* enumerate data blocks for one index-2 block */\n for (i2 = UTRIE2_INDEX_2_BLOCK_LENGTH; i2 > 0; ) {\n block = this.index2[i2Block + --i2];\n if (block === prevBlock) {\n /* the block is the same as the previous one, and filled with highValue */\n c -= UTRIE2_DATA_BLOCK_LENGTH;\n continue;\n }\n prevBlock = block;\n if (block === this.dataNullOffset) {\n /* this is the null data block */\n if (highValue !== this.initialValue) {\n return c;\n }\n c -= UTRIE2_DATA_BLOCK_LENGTH;\n } else {\n for (j = UTRIE2_DATA_BLOCK_LENGTH; j > 0; ) {\n value = this.data[block + --j];\n if (value !== highValue) {\n return c;\n }\n --c;\n }\n }\n }\n }\n }\n /* deliver last range */\n return 0;\n }\n\n /*\n * Compact a build-time trie.\n *\n * The compaction\n * - removes blocks that are identical with earlier ones\n * - overlaps adjacent blocks as much as possible (if overlap==TRUE)\n * - moves blocks in steps of the data granularity\n * - moves and overlaps blocks that overlap with multiple values in the overlap region\n *\n * It does not\n * - try to move and overlap blocks that are not already adjacent\n */\n compactData() {\n let start, movedStart;\n let blockLength, overlap;\n let i, mapIndex, blockCount;\n /* do not compact linear-ASCII data */\n let newStart = UTRIE2_DATA_START_OFFSET;\n for (start = 0, i = 0; start < newStart; start += UTRIE2_DATA_BLOCK_LENGTH, ++i) {\n this.map[i] = start;\n }\n /*\n * Start with a block length of 64 for 2-byte UTF-8,\n * then switch to UTRIE2_DATA_BLOCK_LENGTH.\n */\n blockLength = 64;\n blockCount = blockLength >> UTRIE2_SHIFT_2;\n for (start = newStart; start < this.dataLength; ) {\n /*\n * start: index of first entry of current block\n * newStart: index where the current block is to be moved\n * (right after current end of already-compacted data)\n */\n if (start === UNEWTRIE2_DATA_0800_OFFSET) {\n blockLength = UTRIE2_DATA_BLOCK_LENGTH;\n blockCount = 1;\n }\n /* skip blocks that are not used */\n if (this.map[start >> UTRIE2_SHIFT_2] <= 0) {\n /* advance start to the next block */\n start += blockLength;\n /* leave newStart with the previous block! */\n continue;\n }\n /* search for an identical block */\n movedStart = this.findSameDataBlock(newStart, start, blockLength);\n if (movedStart >= 0) {\n /* found an identical block, set the other block's index value for the current block */\n for (i = blockCount, mapIndex = start >> UTRIE2_SHIFT_2; i > 0; --i) {\n this.map[mapIndex++] = movedStart;\n movedStart += UTRIE2_DATA_BLOCK_LENGTH;\n }\n /* advance start to the next block */\n start += blockLength;\n /* leave newStart with the previous block! */\n continue;\n }\n /* see if the beginning of this block can be overlapped with the end of the previous block */\n /* look for maximum overlap (modulo granularity) with the previous, adjacent block */\n for (\n overlap = blockLength - UTRIE2_DATA_GRANULARITY;\n overlap > 0 && !equalInt(this.data, newStart - overlap, start, overlap);\n overlap -= UTRIE2_DATA_GRANULARITY\n ) {}\n if (overlap > 0 || newStart < start) {\n /* some overlap, or just move the whole block */\n movedStart = newStart - overlap;\n for (i = blockCount, mapIndex = start >> UTRIE2_SHIFT_2; i > 0; --i) {\n this.map[mapIndex++] = movedStart;\n movedStart += UTRIE2_DATA_BLOCK_LENGTH;\n }\n /* move the non-overlapping indexes to their new positions */\n start += overlap;\n for (i = blockLength - overlap; i > 0; --i) {\n this.data[newStart++] = this.data[start++];\n }\n } else {\n /* no overlap && newStart==start */\n for (i = blockCount, mapIndex = start >> UTRIE2_SHIFT_2; i > 0; --i) {\n this.map[mapIndex++] = start;\n start += UTRIE2_DATA_BLOCK_LENGTH;\n }\n newStart = start;\n }\n }\n /* now adjust the index-2 table */\n for (i = 0; i < this.index2Length; ++i) {\n if (i === UNEWTRIE2_INDEX_GAP_OFFSET) {\n /* Gap indexes are invalid (-1). Skip over the gap. */\n i += UNEWTRIE2_INDEX_GAP_LENGTH;\n }\n this.index2[i] = this.map[this.index2[i] >> UTRIE2_SHIFT_2];\n }\n this.dataNullOffset = this.map[this.dataNullOffset >> UTRIE2_SHIFT_2];\n /* ensure dataLength alignment */\n while ((newStart & (UTRIE2_DATA_GRANULARITY - 1)) !== 0) {\n this.data[newStart++] = this.initialValue;\n }\n\n this.dataLength = newStart;\n }\n\n findSameDataBlock(dataLength: int, otherBlock: int, blockLength: int): int {\n let block = 0;\n /* ensure that we do not even partially get past dataLength */\n dataLength -= blockLength;\n for (; block <= dataLength; block += UTRIE2_DATA_GRANULARITY) {\n if (equalInt(this.data, block, otherBlock, blockLength)) {\n return block;\n }\n }\n return -1;\n }\n\n compactTrie() {\n let highValue = this.get(0x10ffff);\n /* find highStart and round it up */\n let localHighStart = this.findHighStart(highValue);\n localHighStart = (localHighStart + (UTRIE2_CP_PER_INDEX_1_ENTRY - 1)) & ~(UTRIE2_CP_PER_INDEX_1_ENTRY - 1);\n if (localHighStart === 0x110000) {\n highValue = this.errorValue;\n }\n /*\n * Set trie->highStart only after utrie2_get32(trie, highStart).\n * Otherwise utrie2_get32(trie, highStart) would try to read the highValue.\n */\n this.highStart = localHighStart;\n\n if (this.highStart < 0x110000) {\n /* Blank out [highStart..10ffff] to release associated data blocks. */\n const suppHighStart = this.highStart <= 0x10000 ? 0x10000 : this.highStart;\n this.setRange(suppHighStart, 0x10ffff, this.initialValue, true);\n }\n this.compactData();\n if (this.highStart > 0x10000) {\n this.compactIndex2();\n }\n /*\n * Store the highValue in the data array and round up the dataLength.\n * Must be done after compactData() because that assumes that dataLength\n * is a multiple of UTRIE2_DATA_BLOCK_LENGTH.\n */\n this.data[this.dataLength++] = highValue;\n while ((this.dataLength & (UTRIE2_DATA_GRANULARITY - 1)) !== 0) {\n this.data[this.dataLength++] = this.initialValue;\n }\n this.isCompacted = true;\n }\n\n compactIndex2(): void {\n let i, start, movedStart, overlap;\n /* do not compact linear-BMP index-2 blocks */\n let newStart = UTRIE2_INDEX_2_BMP_LENGTH;\n for (start = 0, i = 0; start < newStart; start += UTRIE2_INDEX_2_BLOCK_LENGTH, ++i) {\n this.map[i] = start;\n }\n /* Reduce the index table gap to what will be needed at runtime. */\n newStart += UTRIE2_UTF8_2B_INDEX_2_LENGTH + ((this.highStart - 0x10000) >> UTRIE2_SHIFT_1);\n for (start = UNEWTRIE2_INDEX_2_NULL_OFFSET; start < this.index2Length; ) {\n /*\n * start: index of first entry of current block\n * newStart: index where the current block is to be moved\n * (right after current end of already-compacted data)\n */\n /* search for an identical block */\n if ((movedStart = this.findSameIndex2Block(newStart, start)) >= 0) {\n /* found an identical block, set the other block's index value for the current block */\n this.map[start >> UTRIE2_SHIFT_1_2] = movedStart;\n /* advance start to the next block */\n start += UTRIE2_INDEX_2_BLOCK_LENGTH;\n /* leave newStart with the previous block! */\n continue;\n }\n /* see if the beginning of this block can be overlapped with the end of the previous block */\n /* look for maximum overlap with the previous, adjacent block */\n for (\n overlap = UTRIE2_INDEX_2_BLOCK_LENGTH - 1;\n overlap > 0 && !equalInt(this.index2, newStart - overlap, start, overlap);\n --overlap\n ) {}\n if (overlap > 0 || newStart < start) {\n /* some overlap, or just move the whole block */\n this.map[start >> UTRIE2_SHIFT_1_2] = newStart - overlap;\n /* move the non-overlapping indexes to their new positions */\n start += overlap;\n for (i = UTRIE2_INDEX_2_BLOCK_LENGTH - overlap; i > 0; --i) {\n this.index2[newStart++] = this.index2[start++];\n }\n } else {\n /* no overlap && newStart==start */ this.map[start >> UTRIE2_SHIFT_1_2] = start;\n start += UTRIE2_INDEX_2_BLOCK_LENGTH;\n newStart = start;\n }\n }\n /* now adjust the index-1 table */\n for (i = 0; i < UNEWTRIE2_INDEX_1_LENGTH; ++i) {\n this.index1[i] = this.map[this.index1[i] >> UTRIE2_SHIFT_1_2];\n }\n this.index2NullOffset = this.map[this.index2NullOffset >> UTRIE2_SHIFT_1_2];\n /*\n * Ensure data table alignment:\n * Needs to be granularity-aligned for 16-bit trie\n * (so that dataMove will be down-shiftable),\n * and 2-aligned for uint32_t data.\n */\n while ((newStart & ((UTRIE2_DATA_GRANULARITY - 1) | 1)) !== 0) {\n /* Arbitrary value: 0x3fffc not possible for real data. */\n this.index2[newStart++] = 0x0000ffff << UTRIE2_INDEX_SHIFT;\n }\n\n this.index2Length = newStart;\n }\n\n findSameIndex2Block(index2Length: int, otherBlock: int): int {\n /* ensure that we do not even partially get past index2Length */\n index2Length -= UTRIE2_INDEX_2_BLOCK_LENGTH;\n for (let block = 0; block <= index2Length; ++block) {\n if (equalInt(this.index2, block, otherBlock, UTRIE2_INDEX_2_BLOCK_LENGTH)) {\n return block;\n }\n }\n return -1;\n }\n\n _set(c: int, forLSCP: boolean, value: int) {\n if (this.isCompacted) {\n throw new Error('Trie was already compacted');\n }\n const block = this.getDataBlock(c, forLSCP);\n this.data[block + (c & UTRIE2_DATA_MASK)] = value;\n return this;\n }\n\n writeBlock(block: int, value: int) {\n const limit = block + UTRIE2_DATA_BLOCK_LENGTH;\n while (block < limit) {\n this.data[block++] = value;\n }\n }\n\n isInNullBlock(c: int, forLSCP: boolean): boolean {\n const i2 =\n isHighSurrogate(c) && forLSCP\n ? UTRIE2_LSCP_INDEX_2_OFFSET - (0xd800 >> UTRIE2_SHIFT_2) + (c >> UTRIE2_SHIFT_2)\n : this.index1[c >> UTRIE2_SHIFT_1] + ((c >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK);\n const block = this.index2[i2];\n return block === this.dataNullOffset;\n }\n\n fillBlock(block: int, start: int, limit: int, value: int, initialValue: int, overwrite: boolean) {\n const pLimit = block + limit;\n if (overwrite) {\n for (let i = block + start; i < pLimit; i++) {\n this.data[i] = value;\n }\n } else {\n for (let i = block + start; i < pLimit; i++) {\n if (this.data[i] === initialValue) {\n this.data[i] = value;\n }\n }\n }\n }\n\n setIndex2Entry(i2: int, block: int) {\n ++this.map[block >> UTRIE2_SHIFT_2]; /* increment first, in case block==oldBlock! */\n const oldBlock = this.index2[i2];\n if (0 === --this.map[oldBlock >> UTRIE2_SHIFT_2]) {\n this.releaseDataBlock(oldBlock);\n }\n this.index2[i2] = block;\n }\n\n releaseDataBlock(block: int) {\n /* put this block at the front of the free-block chain */\n this.map[block >> UTRIE2_SHIFT_2] = -this.firstFreeBlock;\n this.firstFreeBlock = block;\n }\n\n getDataBlock(c: int, forLSCP: boolean): int {\n let i2 = this.getIndex2Block(c, forLSCP);\n\n i2 += (c >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK;\n const oldBlock = this.index2[i2];\n if (this.isWritableBlock(oldBlock)) {\n return oldBlock;\n }\n /* allocate a new data block */\n const newBlock = this.allocDataBlock(oldBlock);\n this.setIndex2Entry(i2, newBlock);\n return newBlock;\n }\n\n isWritableBlock(block: int): boolean {\n return block !== this.dataNullOffset && 1 === this.map[block >> UTRIE2_SHIFT_2];\n }\n\n getIndex2Block(c: int, forLSCP: boolean): int {\n if (c >= 0xd800 && c < 0xdc00 && forLSCP) {\n return UTRIE2_LSCP_INDEX_2_OFFSET;\n }\n const i1 = c >> UTRIE2_SHIFT_1;\n let i2 = this.index1[i1];\n if (i2 === this.index2NullOffset) {\n i2 = this.allocIndex2Block();\n this.index1[i1] = i2;\n }\n return i2;\n }\n\n allocDataBlock(copyBlock: int): int {\n let newBlock;\n\n if (this.firstFreeBlock !== 0) {\n /* get the first free block */\n newBlock = this.firstFreeBlock;\n this.firstFreeBlock = -this.map[newBlock >> UTRIE2_SHIFT_2];\n } else {\n /* get a new block from the high end */\n newBlock = this.dataLength;\n const newTop = newBlock + UTRIE2_DATA_BLOCK_LENGTH;\n if (newTop > this.dataCapacity) {\n let capacity: int;\n /* out of memory in the data array */\n if (this.dataCapacity < UNEWTRIE2_MEDIUM_DATA_LENGTH) {\n capacity = UNEWTRIE2_MEDIUM_DATA_LENGTH;\n } else if (this.dataCapacity < UNEWTRIE2_MAX_DATA_LENGTH) {\n capacity = UNEWTRIE2_MAX_DATA_LENGTH;\n } else {\n /*\n * Should never occur.\n * Either UNEWTRIE2_MAX_DATA_LENGTH is incorrect,\n * or the code writes more values than should be possible.\n */\n throw new Error('Internal error in Trie creation.');\n }\n\n const newData = new Uint32Array(capacity);\n newData.set(this.data.subarray(0, this.dataLength));\n this.data = newData;\n this.dataCapacity = capacity;\n }\n this.dataLength = newTop;\n }\n\n this.data.set(this.data.subarray(copyBlock, copyBlock + UTRIE2_DATA_BLOCK_LENGTH), newBlock);\n this.map[newBlock >> UTRIE2_SHIFT_2] = 0;\n return newBlock;\n }\n\n allocIndex2Block(): int {\n const newBlock = this.index2Length;\n const newTop = newBlock + UTRIE2_INDEX_2_BLOCK_LENGTH;\n if (newTop > this.index2.length) {\n throw new Error('Internal error in Trie creation.');\n /*\n * Should never occur.\n * Either UTRIE2_MAX_BUILD_TIME_INDEX_LENGTH is incorrect,\n * or the code writes more values than should be possible.\n */\n }\n this.index2Length = newTop;\n this.index2.set(\n this.index2.subarray(this.index2NullOffset, this.index2NullOffset + UTRIE2_INDEX_2_BLOCK_LENGTH),\n newBlock\n );\n return newBlock;\n }\n}\n\nexport const serializeBase64 = (trie: Trie): [string, number] => {\n const index = trie.index;\n const data = trie.data;\n if (!(index instanceof Uint16Array) || !(data instanceof Uint16Array || data instanceof Uint32Array)) {\n throw new Error('TrieBuilder serializer only support TypedArrays');\n }\n const headerLength = Uint32Array.BYTES_PER_ELEMENT * 6;\n const bufferLength = headerLength + index.byteLength + data.byteLength;\n const buffer = new ArrayBuffer(Math.ceil(bufferLength / 4) * 4);\n const view32 = new Uint32Array(buffer);\n const view16 = new Uint16Array(buffer);\n view32[0] = trie.initialValue;\n view32[1] = trie.errorValue;\n view32[2] = trie.highStart;\n view32[3] = trie.highValueIndex;\n view32[4] = index.byteLength;\n // $FlowFixMe\n view32[5] = data.BYTES_PER_ELEMENT;\n\n view16.set(index, headerLength / Uint16Array.BYTES_PER_ELEMENT);\n if (data.BYTES_PER_ELEMENT === Uint16Array.BYTES_PER_ELEMENT) {\n view16.set(data, (headerLength + index.byteLength) / Uint16Array.BYTES_PER_ELEMENT);\n } else {\n view32.set(data, Math.ceil((headerLength + index.byteLength) / Uint32Array.BYTES_PER_ELEMENT));\n }\n\n return [encode(new Uint8Array(buffer)), buffer.byteLength];\n};\n"],"names":["chars","lookup","i"],"mappings":";;;;;AAAA,IAAMA,OAAK,GAAG,kEAAkE,CAAC;AAEjF;AACA,IAAMC,QAAM,GAAG,OAAO,UAAU,KAAK,WAAW,GAAG,EAAE,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;AAC5E,KAAK,IAAIC,GAAC,GAAG,CAAC,EAAEA,GAAC,GAAGF,OAAK,CAAC,MAAM,EAAEE,GAAC,EAAE,EAAE;IACnCD,QAAM,CAACD,OAAK,CAAC,UAAU,CAACE,GAAC,CAAC,CAAC,GAAGA,GAAC,CAAC;CACnC;AAEM,IAAM,MAAM,GAAG,UAAC,MAA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